Fix some note color issues, make gui permission toggleable

This commit is contained in:
Esophose 2020-01-18 17:32:19 -07:00
parent a3d19623f0
commit 7eeb65762e
5 changed files with 12 additions and 7 deletions

View file

@ -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

View file

@ -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

View file

@ -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"),

View file

@ -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());
}
/**

View file

@ -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);
}