mirror of
https://github.com/TotalFreedomMC/PlayerParticles.git
synced 2024-12-28 10:24:15 +00:00
Fix some note color issues, make gui permission toggleable
This commit is contained in:
parent
a3d19623f0
commit
7eeb65762e
5 changed files with 12 additions and 7 deletions
|
@ -3,11 +3,12 @@
|
|||
+ Added setting to disable particles while in combat
|
||||
+ Added effect/style name customization through config files
|
||||
+ Added a setting 'dust-size' to change the size of dust particles in 1.13+
|
||||
+ Added command '/pp fixed teleport <id>' that requires the permission playerparticles.fixed.teleport
|
||||
+ Added sub-command '/pp fixed teleport <id>' that requires the permission playerparticles.fixed.teleport
|
||||
+ Added named colors to the color data autocomplete
|
||||
+ Added an API, accessible through the dev.esophose.playerparticles.api.PlayerParticlesAPI class
|
||||
+ Added PlaceholderAPI support
|
||||
+ Added permission playerparticles.override for /ppo
|
||||
+ Added permission playerparticles.gui to open the GUI. Disabled in the config by default
|
||||
* Config and lang files will no longer reset every update
|
||||
* The style 'normal' is no longer granted permission by default
|
||||
* /ppo now uses your permissions instead of the player you are targeting
|
||||
|
|
|
@ -84,11 +84,11 @@ public class GuiInventoryEditData extends GuiInventory {
|
|||
rainbowColorMapping[6], // 16 Blue
|
||||
rainbowColorMapping[5], // 17 Cyan
|
||||
rainbowColorMapping[5], // 18 Cyan
|
||||
rainbowColorMapping[5], // 20 Lime
|
||||
rainbowColorMapping[5], // 21 Lime
|
||||
rainbowColorMapping[5], // 22 Lime
|
||||
rainbowColorMapping[5], // 23 Lime
|
||||
rainbowColorMapping[5] // 24 Lime
|
||||
rainbowColorMapping[3], // 20 Lime
|
||||
rainbowColorMapping[3], // 21 Lime
|
||||
rainbowColorMapping[3], // 22 Lime
|
||||
rainbowColorMapping[3], // 23 Lime
|
||||
rainbowColorMapping[3] // 24 Lime
|
||||
};
|
||||
|
||||
// Note: Minecraft 1.8 through 1.13 had screwed up note color values, they were thankfully fixed in 1.14
|
||||
|
|
|
@ -36,6 +36,7 @@ public class ConfigurationManager extends Manager {
|
|||
MESSAGES_ENABLED("message-enabled", true, "If you're using other plugins to execute commands you may wish to turn off messages"),
|
||||
USE_MESSAGE_PREFIX("use-message-prefix", true, "Whether or not to use the message-prefix field when displaying messages"),
|
||||
GUI_ENABLED("gui-enabled", true, "If the command /pp gui is enabled", "Disable this if you have your own custom GUI through another plugin"),
|
||||
GUI_REQUIRE_PERMISSION("gui-require-permission", false, "If the GUI should require the permission playerparticles.gui to open"),
|
||||
GUI_PRESETS_ONLY("gui-presets-only", false, "If true, only the preset groups will be available in the GUI", "Permissions to open the GUI will change to only open if the user has any preset groups available"),
|
||||
GUI_CLOSE_AFTER_GROUP_SELECTED("gui-close-after-group-selected", true, "If true, the GUI will close after selecting a group (either saved or preset)"),
|
||||
GUI_BUTTON_SOUND("gui-button-sound", true, "If clicking a GUI button should make a noise"),
|
||||
|
|
|
@ -375,7 +375,7 @@ public class PermissionManager extends Manager {
|
|||
* @return True if the player has permission to open the GUI
|
||||
*/
|
||||
public boolean canOpenGui(PPlayer player) {
|
||||
return PPermission.GUI.check(player.getUnderlyingExecutor());
|
||||
return !Setting.GUI_REQUIRE_PERMISSION.getBoolean() || PPermission.GUI.check(player.getUnderlyingExecutor());
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -21,6 +21,9 @@ public class ParsableNoteColor extends Parsable<NoteColor> {
|
|||
}
|
||||
|
||||
int note = Integer.parseInt(input);
|
||||
if (0 > note || note > 24)
|
||||
return null;
|
||||
|
||||
return new NoteColor(note);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue