Fix wrong message key

This commit is contained in:
Esophose 2020-01-15 23:34:37 -07:00
parent 5a808dbc61
commit 35f0495a0f
4 changed files with 8 additions and 7 deletions

View file

@ -2,7 +2,6 @@
* TODO: v7.0
* + Add ability to create/manage fixed effects from the GUI
* * Convert fixed effect ids into names
* + Add effect/style name customization through config files
* + Add effect/style settings folder that lets you disable effects/style and edit style properties
* + Add setting to disable particles while in combat
* + Add a command aliases section to the config
@ -10,6 +9,7 @@
*/
/*
* + Add effect/style name customization through config files
* * Fixed the 'swords' style so you have to be holding a sword/trident
* * Fixed several styles ignoring the disabled worlds setting
* + Added a setting 'dust-size' to change the size of dust particles in 1.13+
@ -26,6 +26,7 @@
* * Fixed an issue where 'random' data would not parse properly in preset_groups.yml
* * Fixed an issue where preset groups would not display in the GUI even if the player has permission for them
* + Added permission playerparticles.override for /ppo
* * Changed how * permissions are handled, negative permissions should work now
*/
/*

View file

@ -35,9 +35,9 @@ public class GUICommandModule implements CommandModule {
return;
}
if (!Setting.GUI_PRESETS_ONLY.getBoolean() && permissionManager.getEffectNamesUserHasPermissionFor(pplayer.getPlayer()).isEmpty()) {
if (!Setting.GUI_PRESETS_ONLY.getBoolean() && (permissionManager.getEffectsUserHasPermissionFor(pplayer.getPlayer()).isEmpty() || permissionManager.getStylesUserHasPermissionFor(pplayer.getPlayer()).isEmpty())) {
if (byDefault) {
localeManager.sendMessage(pplayer, "command-error-no-effects");
localeManager.sendMessage(pplayer, "command-error-missing-effects-or-styles");
} else {
localeManager.sendMessage(pplayer, "command-error-unknown");
}

View file

@ -44,9 +44,9 @@ public class OtherCommandModule implements CommandModuleSecondary {
return;
}
if (commandModule.requiresEffectsAndStyles() && (permissionManager.getEffectNamesUserHasPermissionFor(other).isEmpty() || permissionManager.getStyleNamesUserHasPermissionFor(other).isEmpty())) {
if (commandModule.requiresEffectsAndStyles() && (permissionManager.getEffectsUserHasPermissionFor(other).isEmpty() || permissionManager.getStylesUserHasPermissionFor(other).isEmpty())) {
localeManager.sendMessage(sender, "other-success", StringPlaceholders.single("player", other.getName()));
localeManager.sendMessage(sender, "command-error-no-effects");
localeManager.sendMessage(sender, "command-error-missing-effects-or-styles");
return;
}

View file

@ -161,8 +161,8 @@ public class CommandManager extends Manager implements CommandExecutor, TabCompl
this.playerParticles.getManager(DataManager.class).getPPlayer(p.getUniqueId(), (pplayer) -> {
PermissionManager permissionManager = PlayerParticles.getInstance().getManager(PermissionManager.class);
if (commandModule.requiresEffectsAndStyles() && (permissionManager.getEffectNamesUserHasPermissionFor(p).isEmpty() || permissionManager.getStyleNamesUserHasPermissionFor(p).isEmpty())) {
localeManager.sendMessage(pplayer, "command-error-no-effects");
if (commandModule.requiresEffectsAndStyles() && (permissionManager.getEffectsUserHasPermissionFor(p).isEmpty() || permissionManager.getStylesUserHasPermissionFor(p).isEmpty())) {
localeManager.sendMessage(pplayer, "command-error-missing-effects-or-styles");
} else {
commandModule.onCommandExecute(pplayer, cmdArgs);
}