From 57b5c2b81ba3db87b8adc928de2d89f9a18f0214 Mon Sep 17 00:00:00 2001 From: yoyosource Date: Thu, 25 Mar 2021 14:17:34 +0100 Subject: [PATCH] Fix TestCommand --- SpigotCore_Main/src/de/steamwar/acommand/TestCommand.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/SpigotCore_Main/src/de/steamwar/acommand/TestCommand.java b/SpigotCore_Main/src/de/steamwar/acommand/TestCommand.java index aa8ca89..9e6a68e 100644 --- a/SpigotCore_Main/src/de/steamwar/acommand/TestCommand.java +++ b/SpigotCore_Main/src/de/steamwar/acommand/TestCommand.java @@ -44,21 +44,21 @@ public class TestCommand extends SWCommand { // Another Command, subCommands can be implemented with the Register Annotation, // you can use custom Mappers by putting a Mapper Annotation on a Parameter @Register({"two"}) - public void testTwo(Player player, int i, @Mapper("Hello World") Material material) { + public void testTwo(Player player, int i, @Mapper("solidMaterial") Material material) { } // Add Custom Mapper when this command is registered, all Mapper of you class will be // created first and than the Commands. Do not use this mapper outside your class, as // it can only create failures. Use on your own risk. Definition order should be considered. - @Mapper("Hello World") + @Mapper("solidMaterial") public TypeMapper materialTypeMapper() { List tabCompletes = Arrays.stream(Material.values()) .filter(Material::isSolid) .map(Material::name) .map(String::toLowerCase) .collect(Collectors.toList()); - return new TypeMapper<>() { + return new TypeMapper() { @Override public Material map(String s) { return Material.valueOf(s.toUpperCase());