From 18ebfdfa448ddcd625db2da3b198c51346f3176f Mon Sep 17 00:00:00 2001 From: Slqmy <90862990+Slqmy@users.noreply.github.com> Date: Mon, 12 Aug 2024 20:03:44 +0100 Subject: [PATCH] Remove unnecessary code --- .../template_paper_plugin/commands/GiveCustomItemCommand.java | 3 +-- .../template_paper_plugin/commands/SetLanguageCommand.java | 3 +-- .../commands/SpawnCustomEntityCommand.java | 3 +-- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/main/java/net/slqmy/template_paper_plugin/commands/GiveCustomItemCommand.java b/src/main/java/net/slqmy/template_paper_plugin/commands/GiveCustomItemCommand.java index 732860a0..8421685e 100644 --- a/src/main/java/net/slqmy/template_paper_plugin/commands/GiveCustomItemCommand.java +++ b/src/main/java/net/slqmy/template_paper_plugin/commands/GiveCustomItemCommand.java @@ -8,7 +8,6 @@ import dev.jorel.commandapi.arguments.ArgumentSuggestions; import dev.jorel.commandapi.arguments.CustomArgument; import dev.jorel.commandapi.arguments.CustomArgument.CustomArgumentException; -import dev.jorel.commandapi.arguments.CustomArgument.CustomArgumentInfo; import dev.jorel.commandapi.arguments.StringArgument; import net.slqmy.template_paper_plugin.TemplatePaperPlugin; import net.slqmy.template_paper_plugin.custom_item.CustomItem; @@ -23,7 +22,7 @@ public GiveCustomItemCommand(TemplatePaperPlugin plugin) { String[] customItemIds = Stream.of(CustomItem.values()).map((customItem) -> customItem.name()).toArray(String[]::new); - Argument customItemArgument = new CustomArgument(new StringArgument(customItemArgumentNodeName), (CustomArgumentInfo info) -> { + Argument customItemArgument = new CustomArgument<>(new StringArgument(customItemArgumentNodeName), (info) -> { String input = info.currentInput(); try { diff --git a/src/main/java/net/slqmy/template_paper_plugin/commands/SetLanguageCommand.java b/src/main/java/net/slqmy/template_paper_plugin/commands/SetLanguageCommand.java index 739048df..58d648d3 100644 --- a/src/main/java/net/slqmy/template_paper_plugin/commands/SetLanguageCommand.java +++ b/src/main/java/net/slqmy/template_paper_plugin/commands/SetLanguageCommand.java @@ -5,7 +5,6 @@ import dev.jorel.commandapi.arguments.ArgumentSuggestions; import dev.jorel.commandapi.arguments.CustomArgument; import dev.jorel.commandapi.arguments.CustomArgument.CustomArgumentException; -import dev.jorel.commandapi.arguments.CustomArgument.CustomArgumentInfo; import dev.jorel.commandapi.arguments.GreedyStringArgument; import java.util.Set; @@ -25,7 +24,7 @@ public SetLanguageCommand(TemplatePaperPlugin plugin) { String languageArgumentNodeName = "language"; - Argument languageArgument = new CustomArgument(new GreedyStringArgument(languageArgumentNodeName), (CustomArgumentInfo info) -> { + Argument languageArgument = new CustomArgument<>(new GreedyStringArgument(languageArgumentNodeName), (info) -> { String selectedLanguage = info.currentInput(); if (!languages.contains(selectedLanguage)) { Component errorMessage = languageManager.getMessage(Message.UNKNOWN_LANGUAGE, info.sender(), selectedLanguage); diff --git a/src/main/java/net/slqmy/template_paper_plugin/commands/SpawnCustomEntityCommand.java b/src/main/java/net/slqmy/template_paper_plugin/commands/SpawnCustomEntityCommand.java index cbad12df..a34b726f 100644 --- a/src/main/java/net/slqmy/template_paper_plugin/commands/SpawnCustomEntityCommand.java +++ b/src/main/java/net/slqmy/template_paper_plugin/commands/SpawnCustomEntityCommand.java @@ -8,7 +8,6 @@ import dev.jorel.commandapi.arguments.ArgumentSuggestions; import dev.jorel.commandapi.arguments.CustomArgument; import dev.jorel.commandapi.arguments.CustomArgument.CustomArgumentException; -import dev.jorel.commandapi.arguments.CustomArgument.CustomArgumentInfo; import dev.jorel.commandapi.arguments.StringArgument; import net.slqmy.template_paper_plugin.TemplatePaperPlugin; import net.slqmy.template_paper_plugin.custom_entity.CustomEntity; @@ -23,7 +22,7 @@ public SpawnCustomEntityCommand(TemplatePaperPlugin plugin) { String[] customEntityIds = Stream.of(CustomEntity.values()).map((customEntity) -> customEntity.name()).toArray(String[]::new); - Argument customEntityArgument = new CustomArgument(new StringArgument(customEntityArgumentNodeName), (CustomArgumentInfo info) -> { + Argument customEntityArgument = new CustomArgument<>(new StringArgument(customEntityArgumentNodeName), (info) -> { String input = info.currentInput(); try {