MOCUserInterface

0 Downloads

Keybindings and graphical user interface (GUI) elements are unmanageable if each plugin does them separately. This allows admins to customize keybingins and button layouts across their various plugins for a coherent user interface. It also allows the creation of buttons to run player commands. Requires Spout.

Part of the Minds of Chimera Project (MOC)!

Minds of Chimera

See our newly released, heavily modded, actively developed server: isue-server.eecs.ucf.edu!

Features:

  • Use configuration files to load keybindings running player commands
  • Use configuration files to organize Spout UI elements on player Heads Up Displays (HUD), game screen and inventory screens
  • Run commands with buttons placed on player inventory screens or other popup screens created on the fly.
  • NOTE: A limitation is the difficulty in finding existing UI elements, not created with this plugin in mind. We are experimenting with searching down the spout UI elements to find and control these. We will see...
  • NOTE: Also looking at producing a report of keybindings associated with plugins, to see if we can overwrite them, and also how to handle player created keybindings.... will see.
  • NOTE: This will be feature poor regarding programmability as there are MANY VERY GOOD plugins for this such as VariableTriggers.

Commands:

  • /ui {help|?} - list help about this plugin
  • /ui reload
  • /ui containers - lists the containers loaded
  • /ui bindings - lists the bindings loaded
  • /ui reload - reloads the elements from the configuration file

Permissions:

moc.ui.X:
- provides player with UI elements associated with this permission group so different players have different UIs

Installation:

  1. add the jar file to your plugins directory
  2. run the server, to produce the config.yml file
  3. adapt the config.yml file to your wishes

Configuration:

There are three main groups of elements at the top level: keybindings, gui, permission. Keybindings and gui contain default controls and permissions allows you to create a keybinding and gui set for players with certain permissions. These permissions groups overwrite each other, in the order they are placed in the file.

keybindins:
gui:
permissions:

Keybindings:

The following example binds the 'i' key to the command '/infoguide' (great plugin by the way).

keybindings:
- 'i'
  - command: "/infoguide"

GUI Elements:

The following example has a button on the player's inventory screen that when pressed, gives the '/infoguide' command. The button is 100,10,10 pixels off the center of the screen, with a tooltip of "Open the Infoguide".

gui:
- "Open the Infoguide"
  - command: "/infoguide"
  - location:
    - screen: "inventory"
    - orientation: center
    - offset: 100,10,10

Permissions:

The following example gives players with the permissionsthe the keybindings and gui elements provided. 'Admin' permission first applies the 'citizen' group. If players have both 'citizen' and 'moderator', then 'citizen' is applied first, then 'moderator'. If they have 'citizen' and 'admin', 'admin' overwrites 'citizen', which is effectively no change since 'admin' inherits from 'citizen'.

permissions:
  - 'citizen'
    - keybindings:
      <stuff>
    - gui:
      <stuff>
  - 'admin'
    - inherit: 'citizen'
    - keybindings:
      <stuff>
    - gui:
      <stuff>
  - 'moderator'
    - keybindings:
      <stuff>
    - gui:
      <stuff>