diff --git a/plugins/fancynpcs/VERSION b/plugins/fancynpcs/VERSION index 2c67cf9f..02d001eb 100644 --- a/plugins/fancynpcs/VERSION +++ b/plugins/fancynpcs/VERSION @@ -1 +1 @@ -2.7.0.285 \ No newline at end of file +2.7.0.286 \ No newline at end of file diff --git a/plugins/fancynpcs/src/main/java/de/oliver/fancynpcs/commands/npc/ActionCMD.java b/plugins/fancynpcs/src/main/java/de/oliver/fancynpcs/commands/npc/ActionCMD.java index 9a9dc5d6..5d221a87 100644 --- a/plugins/fancynpcs/src/main/java/de/oliver/fancynpcs/commands/npc/ActionCMD.java +++ b/plugins/fancynpcs/src/main/java/de/oliver/fancynpcs/commands/npc/ActionCMD.java @@ -13,14 +13,13 @@ import org.incendo.cloud.annotations.Permission; import org.incendo.cloud.annotations.suggestion.Suggestions; import org.incendo.cloud.context.CommandContext; import org.incendo.cloud.context.CommandInput; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; import java.util.ArrayList; import java.util.Collections; import java.util.List; -import org.jetbrains.annotations.NotNull; -import org.jetbrains.annotations.Nullable; - public enum ActionCMD { INSTANCE; // SINGLETON @@ -49,6 +48,11 @@ public enum ActionCMD { .translate("npc_action_add_success") .replaceStripped("total", String.valueOf(npc.getData().getActions(trigger).size())) .send(sender); + + if (actionType.getName().equalsIgnoreCase("player_command_as_op")) { + translator.translate("npc_action_add_op_warning") + .send(sender); + } } @Command("npc action add_before [value]") @@ -77,6 +81,11 @@ public enum ActionCMD { .replaceStripped("number", String.valueOf(index)) .replaceStripped("total", String.valueOf(npc.getData().getActions(trigger).size())) .send(sender); + + if (actionType.getName().equalsIgnoreCase("player_command_as_op")) { + translator.translate("npc_action_add_op_warning") + .send(sender); + } } @Command("npc action add_after [value]") @@ -105,6 +114,11 @@ public enum ActionCMD { .replaceStripped("number", String.valueOf(index)) .replaceStripped("total", String.valueOf(npc.getData().getActions(trigger).size())) .send(sender); + + if (actionType.getName().equalsIgnoreCase("player_command_as_op")) { + translator.translate("npc_action_add_op_warning") + .send(sender); + } } @Command("npc action set [value]") @@ -140,6 +154,11 @@ public enum ActionCMD { .replaceStripped("number", String.valueOf(number)) .replaceStripped("total", String.valueOf(npc.getData().getActions(trigger).size())) .send(sender); + + if (actionType.getName().equalsIgnoreCase("player_command_as_op")) { + translator.translate("npc_action_add_op_warning") + .send(sender); + } } @Command("npc action remove ") diff --git a/plugins/fancynpcs/src/main/resources/languages/default.yml b/plugins/fancynpcs/src/main/resources/languages/default.yml index ac38fbd4..b3caa93c 100644 --- a/plugins/fancynpcs/src/main/resources/languages/default.yml +++ b/plugins/fancynpcs/src/main/resources/languages/default.yml @@ -189,6 +189,7 @@ messages: npc_action_add_success: "Action has been added. There are {warningColor}{total} actions in total." npc_action_add_before_success: "Action has been added before action {warningColor}{number}. There are {warningColor}{total} actions in total." npc_action_add_after_success: "Action has been added after action {warningColor}{number}. There are {warningColor}{total} actions in total." + npc_action_add_op_warning: "› {warningColor}FancyNpcs will give the player operator permissions for the duration of the command execution. This means that the player will have access to all commands and permissions during that time. This can be a security risk if not used carefully, so make sure to use this action only when necessary and with trusted players." npc_action_set_success: "Action trigger {warningColor}{number} has been updated. There are {warningColor}{total} actions in total." npc_action_set_failure: "› {errorColor}Action trigger {warningColor}{number}{errorColor} does not exist." npc_action_move_up_success: "Action trigger {warningColor}{number} has been moved up."