-
Notifications
You must be signed in to change notification settings - Fork 3
features
Chat UI transforms the chat box into a Graphical User Interface by utilizing advanced features of the vanilla text format.
The entire visible chat box defines the boundary for the 'window' in which content can be placed in.
Each time the window gets updated (for example a player sent a message) the entire visible region must be updated, therefore a whole new frame is sent to the player. Essentially this pushes the old frame out of view to reveal the updated frame.
See the developer documentation for a technical description of how it works.
At the top of the window there is a tab bar, this is similar to most web browsers where tabs can be selected by clicking on the label. Most tabs also feature a close button ([X]
), the "Global" tab cannot be closed because it serves as a default tab and will display the chat.
Along the bottom is a status bar. It keeps track of the number of unread messages from all tabs.
To the right, there are two buttons: [Scroll Up]
and [Scroll Down]
. These allow for scrolling through the chat window because scrolling with the mouse wheel or "page up/down" no longer will work as effectively.
The "new tab" screen is a list of buttons that will launch a tab once a button is clicked. The screen will have different buttons depending on the permissions of the player viewing it.
This tab shows a table of all players currently on the server. Depending on the permissions of the player viewing the list, there may be a Kick or Ban button (see the configuration). If the "private message" feature is enabled, all players get a "Message" button on the table. If the player has Chat UI enabled, and the player is not yourself, clicking on the button will open a private message with the other player.
If the private messaging feature is enabled, players can send private messages to each other. It is important to note that this feature is simple and does not have any sort of message saving, so messages are lost once the tab is closed.
On the other player's chat window, a new tab pops up with the conversation with the number of unread messages in the title.
This feature is more or less for demonstrational purposes since there is very little configuration for it.
If a player has the required permission, they can create groups. There is also a permission to delete groups. Any player can talk in a group, upon entering you will see a recent log of messages from that group.
Chat UI will open paginations (a sponge feature) in a separate tab to reduce clutter from the global chat.
The configuration editor allows a server admin to view/modify the server's configuration file from in-game (permission dependent). The config is sponge's global.conf
file.
The editor presents a table with keys and values, with a "breadcrumb" (the current path) at the top. To go back out of a node, click on the parent key in the breadcrumb.
The editor supports the different "types" of values possible with the config system in sponge. (Number, Boolean, String, List and Map)
To edit a value click on a row. The other rows will become gray to show the focus on one row. Clicking a second time will put the current value in the chat for easy modification or copying out. The config entry can be deleted by clicking the [Delete]
button. There is also a delete button when no value is focused, clicking this makes the next config entry you click on get deleted. Boolean values (true/false) are toggled by clicking on them.
Clicking on the [Add]
button will show a screen to configure a new config entry. Here, type the name of the key for the entry. Then click on one of the value types from the selection. A default value is then assigned but you can set the value by typing it in the chat.
This tab allows admins to configure permissions, provided they have the required permissions. The first screen shows buttons for all subject collections.
When clicking on one of these buttons, a table is shown with all known entries in the collection. You can add and remove entries with the [Add]
or X
buttons.
Clicking on a subject opens the subject viewer. This screen features many options, primarily because there is lots of flexibility with sponge's permission system.
At the top, there is a list of parent subjects for the current subject. You can click on one to open it, or click [x]
to remove it as a parent. Parents can be added with the [Add Parent]
button.
At the bottom left the [Return]
button takes you back to the previous screen.
Below the list of parents is the current context. This is currently fixed to "global", in a future version this will be configurable.
The main feature of the subject viewer is the table of permissions. This is a list of all permissions explicitly granted or denied to the subject. To toggle between grant and deny, click on the entry.
Entries can be added with the [Add]
button, and removed by clicking on the X
beside the entry.
On the bottom, the default permission state can be set. There are 3 possible states: TRUE, FALSE and UNDEFINED. The states can be toggled by clicking on it.
The [Options]
button opens an options table, here you can set key-value pairs. Options are supported by some permissions plugins and the specifics of them depends on the plugin.
Note: The permissions editor has additional support for PEX (PermissionsEx), not all features may work correctly with other permissions.
The settings tab configures settings for how Chat UI is displayed to the player. The settings option is per-player and is always available (no permissions required).
The settings use the same configuration editor as above, except some features have been disabled.
The following table describes each setting:
The settings control Chat UI Library config. See details on the options here: https://ore.spongepowered.org/simon816/Chat-UI-Library#player-settings
The one additional setting is "enabled". Setting this to false immediately removes the window and from that point on normal chat is shown. Chat UI can be re-enabled with the command /chatui enable
. It can also be disabled with the command /chatui disable