From 6f35da03e74c4939102ffa9800955989976492e6 Mon Sep 17 00:00:00 2001 From: EpicKnarvik97 Date: Fri, 18 Feb 2022 23:16:47 +0100 Subject: [PATCH] Makes some changes in preparation for some commands that need to be added Prepares the new command layout, changes the .add permission to .manage and adds 4 empty command classes --- README.md | 9 +++++-- .../command/AddConditionCommand.java | 17 ++++++++++++ .../paidsigns/command/ListCommand.java | 15 +++++++++++ .../command/ListConditionsCommand.java | 15 +++++++++++ .../command/RemoveConditionCommand.java | 15 +++++++++++ src/main/resources/plugin.yml | 26 ++++++++++++++----- 6 files changed, 88 insertions(+), 9 deletions(-) create mode 100644 src/main/java/net/knarcraft/paidsigns/command/AddConditionCommand.java create mode 100644 src/main/java/net/knarcraft/paidsigns/command/ListCommand.java create mode 100644 src/main/java/net/knarcraft/paidsigns/command/ListConditionsCommand.java create mode 100644 src/main/java/net/knarcraft/paidsigns/command/RemoveConditionCommand.java diff --git a/README.md b/README.md index d5e4ce7..fd8d546 100644 --- a/README.md +++ b/README.md @@ -13,6 +13,11 @@ As this plugin only listens to sign change events, there are some limitations: ## Commands -* /addpaidsign \[ignore case] \[ignore color] -* /removepaidsign +* /addpaidsign \[permission] \[ignore case] \[ignore color] +* /addpaidsigncondition \[executeRegEx] \[ignoreCase] + \[ignoreColor] +* /listpaidsigns +* /listpaidsignconditions +* /removepaidsigncondition +* /removepaidsign * /reload \ No newline at end of file diff --git a/src/main/java/net/knarcraft/paidsigns/command/AddConditionCommand.java b/src/main/java/net/knarcraft/paidsigns/command/AddConditionCommand.java new file mode 100644 index 0000000..8c2345d --- /dev/null +++ b/src/main/java/net/knarcraft/paidsigns/command/AddConditionCommand.java @@ -0,0 +1,17 @@ +package net.knarcraft.paidsigns.command; + +import org.bukkit.command.Command; +import org.bukkit.command.CommandExecutor; +import org.bukkit.command.CommandSender; +import org.jetbrains.annotations.NotNull; + +public class AddConditionCommand implements CommandExecutor { + + @Override + public boolean onCommand(@NotNull CommandSender sender, @NotNull Command command, @NotNull String label, @NotNull String[] args) { + + + return false; + } + +} diff --git a/src/main/java/net/knarcraft/paidsigns/command/ListCommand.java b/src/main/java/net/knarcraft/paidsigns/command/ListCommand.java new file mode 100644 index 0000000..f39203c --- /dev/null +++ b/src/main/java/net/knarcraft/paidsigns/command/ListCommand.java @@ -0,0 +1,15 @@ +package net.knarcraft.paidsigns.command; + +import org.bukkit.command.Command; +import org.bukkit.command.CommandExecutor; +import org.bukkit.command.CommandSender; +import org.jetbrains.annotations.NotNull; + +public class ListCommand implements CommandExecutor { + + @Override + public boolean onCommand(@NotNull CommandSender sender, @NotNull Command command, @NotNull String label, @NotNull String[] args) { + return false; + } + +} diff --git a/src/main/java/net/knarcraft/paidsigns/command/ListConditionsCommand.java b/src/main/java/net/knarcraft/paidsigns/command/ListConditionsCommand.java new file mode 100644 index 0000000..dbaa949 --- /dev/null +++ b/src/main/java/net/knarcraft/paidsigns/command/ListConditionsCommand.java @@ -0,0 +1,15 @@ +package net.knarcraft.paidsigns.command; + +import org.bukkit.command.Command; +import org.bukkit.command.CommandExecutor; +import org.bukkit.command.CommandSender; +import org.jetbrains.annotations.NotNull; + +public class ListConditionsCommand implements CommandExecutor { + + @Override + public boolean onCommand(@NotNull CommandSender sender, @NotNull Command command, @NotNull String label, @NotNull String[] args) { + return false; + } + +} diff --git a/src/main/java/net/knarcraft/paidsigns/command/RemoveConditionCommand.java b/src/main/java/net/knarcraft/paidsigns/command/RemoveConditionCommand.java new file mode 100644 index 0000000..da12b3e --- /dev/null +++ b/src/main/java/net/knarcraft/paidsigns/command/RemoveConditionCommand.java @@ -0,0 +1,15 @@ +package net.knarcraft.paidsigns.command; + +import org.bukkit.command.Command; +import org.bukkit.command.CommandExecutor; +import org.bukkit.command.CommandSender; +import org.jetbrains.annotations.NotNull; + +public class RemoveConditionCommand implements CommandExecutor { + + @Override + public boolean onCommand(@NotNull CommandSender sender, @NotNull Command command, @NotNull String label, @NotNull String[] args) { + return false; + } + +} diff --git a/src/main/resources/plugin.yml b/src/main/resources/plugin.yml index de4fdaf..324607d 100644 --- a/src/main/resources/plugin.yml +++ b/src/main/resources/plugin.yml @@ -6,20 +6,32 @@ prefix: PaidSigns depend: [ Vault ] authors: [ EpicKnarvik97 ] description: Add costs for creating plugin signs -website: https://git.knarcraft.net +website: https://git.knarcraft.net/EpicKnarvik97/PaidSigns commands: addpaidsign: description: Used to add a new paid sign usage: / [permission] [ignore case] [ignore color] - permission: paidsigns.add + permission: paidsigns.manage addpaidsigncondition: description: Used to add a new match condition for a paid sign - usage: / [executeRegEx] [ignoreCase] [ignoreColor] - permission: paidsigns.add + usage: / [executeRegEx] [ignoreCase] [ignoreColor] + permission: paidsigns.manage + listpaidsigns: + description: Lists all previously added paid signs + usage: / + permission: paidsigns.manage + listpaidsignconditions: + description: Lists all conditions added to the given paid sign + usage: / + permission: paidsigns.manage + removepaidsigncondition: + description: Used to remove a match condition from a paid sign + usage: / + permission: paidsigns.manage removepaidsign: description: Used to remove a paid sign - usage: / - permission: paidsigns.remove + usage: / + permission: paidsigns.manage reload: description: Reloads paid signs from disk usage: / @@ -32,7 +44,7 @@ permissions: paidsigns.create: true paidsigns.paymentexempt: true paidsigns.reload: true - paidsigns.add: + paidsigns.manage: description: Grants the permission to add/remove a paid sign default: false paidsigns.reload: