Update version to 6.3.0; add configurable truthy condition values, improve condition handling, and refactor config messages
- **Configurations**:
- Introduced `truthyConditionValues` for customizable condition evaluation (`true`, `yes`, etc.) within conditions.
- Updated `config.yml` and `custom_gui.yml_example` to reflect new `truthy-values` option with expanded documentation.
- Added `%prefix%` support across configurable messages for easier customization.
- Refactored config messages to include a global prefix for improved consistency and user experience.
- **Parsing/Validation**:
- Enhanced slot validation in `Config`, issuing warnings for missing or invalid slots in custom items.
- Improved condition logic in `GUIUtils` to match against `truthyConditionValues` for greater flexibility.
- Added better error handling with warnings for unrecognized operators in conditional expressions.
- **Listeners**:
- Updated `InventoryListener` to handle additional edge cases in inventory interactions (e.g., shift-click within custom GUIs).
- **Other Changes**:
- Minor refactoring, improved readability with updated method calls and local variable usage.
- Updated dependencies and plugin compatibility for plugin behavior consistency.
Added support for PremiumVanish/SuperVanish.
Config option "essentialsx-hook" has been moved to:
Code (Text):
hooks:
essentialsx-hook: false
premium-vanish-hook: false
Be sure to update your config.yml accordingly.
Enhance condition operators: expanded support for text and digit comparisons
Condition Operators:
Text operators:
=, ==, eq, equal_to, equals — equals
!=, neq, ne, not_equal — not equals
~=, ~~, contains, contains_string — contains
!~=, !~~, !contains, not_contains, not_contains_string — does not contain
starts, starts_with — starts with
ends, ends_with — ends with
matches, regex — matches regex
!matches, !regex, not_matches, not_regex — does not match regex
Digit operators:
>, gt, greater_than — greater than
<, lt, less_than — less than
>=, gte, greater_than_or_equal — greater than or equal
<=, lte, less_than_or_equal — less than or equal
=, ==, eq, equal_to, equals — equals
!=, neq, ne, not_equal — not equals
(All text operators above also work for digits, comparing as strings.)
---
- **`config.yml` & `custom_gui.yml_example`**:
- Documented and expanded available condition operators for text and numbers, including new options for equality, inequality, contains, regex matching, starts/ends with, and more.
- **`GUIUtils`**:
- Updated condition handling logic to support new operators with `PlaceholderAPI` replacements for placeholders.
- Added more robust string and digit comparison capabilities with detailed operator checks.
- Improved maintainability by using `switch-case` for operator evaluations.
This change significantly expands flexibility in defining conditions across the configuration and custom GUI systems.
Support Minecraft 1.20.x and 1.21.x versions, refactor code for Adventure API, modernize dependencies, and update Gradle to 8.10. Refactored button handling and material parsing logic; streamlined inventory initialization.
- Added MiniMessage support.
- Added explicit support for Minecraft versions 1.20.x and 1.21.x in `Version.java`.
- Refactored text handling to use the Kyori Adventure library (`TextUtils`).
- Replaced usage of deprecated `displayName` and `lore` with their Adventure API equivalents.
- Improved code readability with modern Java features like enhanced `try` blocks and local variable inference.
- Updated the Gradle Wrapper to version 8.10. - Simplified configuration and enums for better flexibility (e.g., replaced outdated mapping methods and removed unused getters).
- Optimized command execution logic using `CommandActionParser`.
- Cleaned up legacy code and streamlined button logic to enhance overall functionality.
- **`CommandActionParser`**: Improved substring logic to correctly handle trailing spaces.
- **`Config`**: Simplified `Material` parsing; fallback to `AIR` if the material is invalid.
- **`OnlineGUIInventory` & `ConditionalGUIInventory`**:
- Factored out repeated `setButtons()` calls, ensuring buttons are initialized where necessary.
- Replaced iterative logic with `IntStream` for cleaner inventory slot handling.
- Added nullability annotations to `execute` method in `ConditionalGUIInventory` for clarity.
- General code cleanup for improved readability and maintainability.
- Add persistent notification flag for UNKNOWN version warnings.
Bump build version to 1.20.1
As of 1.18.2, paper requires you to have Java 17, hence the support for Java 8 is dropped.
Please update to Java 17, else the plugin will not work.
THIS IS A BETA/PREVIEW VERSION FOR VERSIONS BELOW 1.13
Some features may not work correctly and there might be bugs.
If you encounter any - make sure to report them to me.
This update has little to none updates/changes, except for older version support.
Fixed a small issue regarding plugin configuration.
PLEASE READ THIS CHANGELOG
AND UPDATE YOUR CONFIG
BACK-UP YOUR CONFIG BEFORE UPDATE!
Hello everyone.
It's been a while since I've updated the plugin so I added a few new cool additions to the config.
First things first - you can now place custom items anywhere in the GUI itself. The heads will appear in the first empty slot.
The bottom row is reserved for custom items and the heads will not appear there.
The 4th and 6th slots of each row (depending on the GUI size) are always reserved for previous and next page buttons.
Example config for custom items:
Code (YAML):
custom-items:
'1':
material
: WHITE_STAINED_GLASS_PANE
slots:
start
: 0
end
: 8
name
: '&r'
lore
:
[
]
commands:
left-click
:
- '
[CLOSE
]'
right-click
:
- '
[CLOSE
]'
middle-click
:
- '
[CLOSE
]'
'2':
material
: WHITE_STAINED_GLASS_PANE
slots
:
- 9
- 17
- 18
- 19
- 20
- 22
- 24
- 25
- 26
name
: '&r'
lore
:
[
]
You can use:
Code (YAML):
slots:
start
: X
end
: Y
slot
: X
slots
:
- X
- Y
-
...
Added additional actions for commands:
This will play a sound to the player.
The first argument is the sound, the second is the volume and the third is the pitch.
You can find a list of sounds here: https://www.digminecraft.com/lists/sound_list_pc.php
- '[SOUND] ENTITY.PLAYER.LEVELUP, 1.0, 1.0'
This will show a title to the player.
The first argument is the title, the second is the subtitle.
The last three are: fade-in, stay and fade-out times.
- '[TITLE] This is a title, This is a subtitle, 20, 60, 20'
Alternatively you can use opt out the subtitle or the times, or just the subtitle.
- '[TITLE] This is a title'
- '[TITLE] This is a title, 20, 60, 20'
You can send raw messages to the player:
- '[MESSAGE] this will send a message to the player'
- '[TEXT] this will also send a message to the player'
Plugin now works correctly on 1.18.
Removed the PlaceholderAPI requirement. Some default placeholder names will still work like %player_name% & %sender_name%.
For more placeholder use PlaceholderAPI.
Added HEX color support.
Example usage: "#FF5BC8%player_name%"
Added ability to check text in conditions if a placeholder returns not a number.
Ex.:
Code (YAML):
Condition:
Required
: false
Placeholder
:
"%example_placeholder% == hello"
The player will be included if "%example_placeholder%" returns value "hello".
This version has been compiled with Java 16 and will most likely not work with older versions of Java.
I recommend you to update as soon as possible.
You can find more information on how to do that on PaperMC wiki:
Java 16, MC 1.17, and Paper - Announcements - PaperMC Forums
Changed HideButtonsOnSinglePage config option to
AlwaysShowPageButtons.
If set to true - it will displays Next and Previous page buttons at all times, in other case - buttons will only be displayed if there's a Previous or Next page.
Did some major code refactoring, which should increase the performance ever so slightly.
Added more PlaceholderAPI support.
Added an option to close the GUI if added [CLOSE] in the command section.
Removed CloseOnRightClick & CloseOnLeftClick in the Custom Items section.
Code (YAML):
Commands:
Left-Click
:
- '
[CLOSE
]'
- '
[CONSOLE
] msg
%player_name% Hello!'
Right-Click
:
- '
[CLOSE
]'
- '
[PLAYER
] tp
%player_name%'
Added a config option to require a specific permission for the user to be displayed.
Condition in the main config does not have to be enabled, where as in the Conditional GUI config the condition is used by default - in this case you can use a placeholder that would accept all players.
Downgraded the API version so lower versions can use the plugin.
Code (YAML):
Condition:
Required
: false
Placeholder
:
"%checkitem_mat:DIRT%"
Permission:
Required
: false
Node
:
"permission.to.include.player"
This update is fully prepared for Conditional GUI use and adds several other useful features.
You can now use operators (>, >=, <, <=, = or ==, !=) to compare values and check if it matches the condition.
Ex. you can use "%vault_eco_balance% > 1000" to check if player has more than 1000 balance, etc.
You can use placeholders on both sides.
There must be a space between the values and operator.
You can use placeholder which return a numeric value, it won't work correctly if it returns for ex. time (1d 30m, etc.).
There is now a permission for Conditional GUI, which goes as follows:
m0onlinegui.conditional.<conditional_name>, example:
m0onlinegui.conditional.richplayers
You can also set a custom deny message if player tries to open a Conditional GUI that he does not have permission to.
As for Conditional GUI configuration, read more on wiki:
Configuration · M0diis/M0-OnlinePlayersGUI Wiki (github.com)
Hello everyone.
This update is pretty major since a huge part of code has been rewritten and changed as well as a lot of new stuff has been added.
This current version is pre-release of the current state of the plugin and may contain unwanted bugs or errors, if anything - please inform me by contacting directly on spigot or through discord @ M0dii#2719.
This version will still fully support older Java versions (Java 8) and Minecraft 1.16, though the next release will be fully built for Java 16 and Minecraft 1.17, though it might still work on older Minecraft versions.
The biggest part of the update are Conditional GUIs.
You can now create your own, unlimited custom GUIs without having to rely on only one available player listing ability.
To create a custom Conditional GUI, head to the plugin directory and open up /Custom/ folder (/plugins/M0-OnlinePlayersGUI/Custom) - here you will be able to create Conditional GUIs.
You can find an example of how one looks on GitHub:
M0-OnlinePlayersGUI/custom_gui.yml at main
The GUI will be able to be opened with /onlinegui filename (without .yml of course) and will be suggested by tab complete if one exists.
To load up the GUI after creating - simply reload the plugin using the command /onlinegui reload.
Added a command to toggle personal visibility in the GUI:
- Required permission: m0onlinegui.command.toggleself
- Command: /onlinegui toggleself
- The message can be configured in the config.yml
Fixed a bug in the code which caused next and previous page buttons to work incorrectly.
Improved code performance in general, did some code refactoring. Planning to soon update to Java 16 and prepare for Minecraft 1.17.
Added ability to only display players with specified condition.
Example usage:
Code (YAML):
Condition:
Required
: true
Placeholder
:
"%checkitem_mat:DIRT%"
This will only display players that have dirt in their inventory.
You can find all the placeholders on
Placeholders · PlaceholderAPI/PlaceholderAPI Wiki (github.com)
Currently only works with placeholders that return true or false. (yes or no)
Added update checker so you will be notified in the console when there is a new update released.
This update is optional and does not add any additional features to the plugin.
Added https://bstats.org/ to track plugin usage.
If you want to opt-out from the tracking, you can do that by accessing your /plugins/bStats/ folder and editing the config file.
You can now reload the plugin config from the console.
# Fixed some reload issues.
# Added some fail-safes in the config load in case of typos.
# Improved load/reload code.
Fixed a bug where placeholders are applied to the wrong player (the player who is sending the command, not the other players).
Bumped spigot version from 1.16.4 to 1.16.5.
Added placeholder to insert sender name in sent commands.
Placeholder %sender_name%:
Commands:
Left-Click:
- '[PLAYER] msg %player_name% Hello, my name is %sender_name%.'
Cleaned up some unused code to save some performance.
Reduced the size of the
M0 logo when loaded.
(Provided example with PAPI Server expansion)
Usage example:
Code (YAML):
Material
: CLOCK
Name
: '&2Server Uptime'
Lore
:
- '&2» &a
%server_uptime%'
Commands:
CloseOnLeftClick
: false
Left-Click
:
- '
[CONSOLE
] msg
%player_name% %server_uptime%'
CloseOnRightClick
: false
Right-Click
:
[
]
Added PlaceholderAPI support for custom item names/lores.
Added PlaceholderAPI support for left/right click commands.
The config now automatically updates with new config options.
Added ability to add commands to custom display items, which also support [PLAYER] & [CONSOLE] sending.
PAPI Placeholders not supported yet.
Commands:
CloseOnLeftClick: false
Left-Click:
- '[CONSOLE] somecommandhere'
CloseOnRightClick: false
Right-Click:
- '[PLAYER] somecommandhere'
Code (YAML):
CustomItems:
'1':
Material
: AIR
Name
: ''
Lore
:
[
]
Commands:
CloseOnLeftClick
: false
Left-Click
:
[
]
CloseOnRightClick
: false
Right-Click
:
[
]
'2':
Material
: AIR
Name
: ''
Lore
:
[
]
Commands:
CloseOnLeftClick
: false
Left-Click
:
[
]
CloseOnRightClick
: false
Right-Click
:
[
]
'3':
Material
: AIR
Name
: ''
Lore
:
[
]
Commands:
CloseOnLeftClick
: false
Left-Click
:
[
]
CloseOnRightClick
: false
Right-Click
:
[
]
'5':
Material
: AIR
Name
: ''
Lore
:
[
]
Commands:
CloseOnLeftClick
: false
Left-Click
:
[
]
CloseOnRightClick
: false
Right-Click
:
[
]
'7':
Material
: AIR
Name
: ''
Lore
:
[
]
Commands:
CloseOnLeftClick
: false
Left-Click
:
[
]
CloseOnRightClick
: false
Right-Click
:
[
]
'8':
Material
: AIR
Name
: ''
Lore
:
[
]
Commands:
CloseOnLeftClick
: false
Left-Click
:
[
]
CloseOnRightClick
: false
Right-Click
:
[
]
'9':
Material
: AIR
Name
: ''
Lore
:
[
]
Commands:
CloseOnLeftClick
: false
Left-Click
:
[
]
CloseOnRightClick
: false
Right-Click
:
[
]
Fixed issue with player count display in the GUI title (%playercount%).
Added two new config options for left and right click (changed old, single one).
Code (YAML):
CloseOnLeftClick
: false
CloseOnRightClick
: false
Fixed issues with the plugin not working correctly.
Previous version was working incorrectly.
Added ability in config to send clicked command as console.
Old config should work as usual.
Code (YAML):
Commands:
Left-Click
:
- '
[PLAYER
] tp
%player_name%'
Right-Click
:
- '
[CONSOLE
] msg
%player_name% Hello!'
Added ability in config to send clicked command as console.
Old config should work as usual.
Code (YAML):
Commands:
Left-Click
:
- '
[PLAYER
] tp
%player_name%'
Right-Click
:
- '
[CONSOLE
] msg
%player_name% Hello!'
Fixed reload command (/onlinegui reload).
Added config option to close the GUI on click (Check the config in the main page).
Cleaned up and improved code stability/performance.
Bumped EssX version to 2.18.2.
This marks quite a bit update for the plugin.
Decided to bump the version to 2.0, since this marks one of the most *stable* and biggest updates.
- General code improvements;
- Improved code stability and speed;
- Introduced custom item display (currently limited to defined slots and buttons row);
Be sure to update your old config with these values:
Code (YAML):
CustomItems:
1:
Material
: AIR
Name
: ''
Lore
:
[
]
2:
Material
: AIR
Name
: ''
Lore
:
[
]
3:
Material
: AIR
Name
: ''
Lore
:
[
]
5:
Material
: AIR
Name
: ''
Lore
:
[
]
7:
Material
: AIR
Name
: ''
Lore
:
[
]
8:
Material
: AIR
Name
: ''
Lore
:
[
]
9:
Material
: AIR
Name
: ''
Lore
:
[
]
You can now display player count in the GUI with a placeholder %playercount%.
Updated permission syntax to match my other plugins.
Don't forget to change your old permissions.
You can now enable/disable EssentialsX hook in the config.
Vanished players won't be included in the GUI.
The config was changed drastically, be sure to renew it - backup your old config and restart the server.
Added config option to change the GUI title.
Added config option to add lore to previous and next buttons.
Added configurable button names and some other options.
Introduced pages and configurable size.
Be sure to renew your old config.
Update on leave now works correctly.
Config options to update on join and leave.
Fixed click working everywhere.
Introduced click commands.