9
0
mirror of https://github.com/HibiscusMC/HMCCosmetics.git synced 2025-12-28 03:19:15 +00:00

Added tab completions to dye command

This commit is contained in:
HeroBrineGoat
2021-11-15 00:16:07 -05:00
parent 3b49c54ce0
commit f46a48a213
4 changed files with 29 additions and 9 deletions

View File

@@ -4,6 +4,7 @@ import com.comphenix.protocol.ProtocolLib;
import com.comphenix.protocol.ProtocolLibrary;
import com.comphenix.protocol.ProtocolManager;
import io.github.fisher2911.hmccosmetics.command.CosmeticsCommand;
import io.github.fisher2911.hmccosmetics.gui.ArmorItem;
import io.github.fisher2911.hmccosmetics.gui.CosmeticsMenu;
import io.github.fisher2911.hmccosmetics.listener.ClickListener;
import io.github.fisher2911.hmccosmetics.listener.JoinListener;
@@ -14,7 +15,9 @@ import io.github.fisher2911.hmccosmetics.user.UserManager;
import me.mattstudios.mf.base.CommandManager;
import org.bukkit.plugin.java.JavaPlugin;
import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;
public class HMCCosmetics extends JavaPlugin {
@@ -64,6 +67,13 @@ public class HMCCosmetics extends JavaPlugin {
)
);
this.commandManager.getCompletionHandler().register("#types",
resolver ->
Arrays.stream(ArmorItem.Type.
values()).
map(ArmorItem.Type::toString).
collect(Collectors.toList())
);
this.commandManager.register(new CosmeticsCommand(this));
}