Skip to content

Commit

Permalink
Remove unnecessary code
Browse files Browse the repository at this point in the history
  • Loading branch information
esotericenderman committed Aug 12, 2024
1 parent ce886af commit 18ebfdf
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -23,7 +22,7 @@ public GiveCustomItemCommand(TemplatePaperPlugin plugin) {

String[] customItemIds = Stream.of(CustomItem.values()).map((customItem) -> customItem.name()).toArray(String[]::new);

Argument<CustomItem> customItemArgument = new CustomArgument<CustomItem, String>(new StringArgument(customItemArgumentNodeName), (CustomArgumentInfo<String> info) -> {
Argument<CustomItem> customItemArgument = new CustomArgument<>(new StringArgument(customItemArgumentNodeName), (info) -> {
String input = info.currentInput();

try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -25,7 +24,7 @@ public SetLanguageCommand(TemplatePaperPlugin plugin) {

String languageArgumentNodeName = "language";

Argument<String> languageArgument = new CustomArgument<String, String>(new GreedyStringArgument(languageArgumentNodeName), (CustomArgumentInfo<String> info) -> {
Argument<String> 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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -23,7 +22,7 @@ public SpawnCustomEntityCommand(TemplatePaperPlugin plugin) {

String[] customEntityIds = Stream.of(CustomEntity.values()).map((customEntity) -> customEntity.name()).toArray(String[]::new);

Argument<CustomEntity> customEntityArgument = new CustomArgument<CustomEntity, String>(new StringArgument(customEntityArgumentNodeName), (CustomArgumentInfo<String> info) -> {
Argument<CustomEntity> customEntityArgument = new CustomArgument<>(new StringArgument(customEntityArgumentNodeName), (info) -> {
String input = info.currentInput();

try {
Expand Down

0 comments on commit 18ebfdf

Please sign in to comment.