Add MaterialArgument

This commit is contained in:
Alexander Söderberg 2020-09-17 21:04:09 +02:00
parent 8190c96d1c
commit a749b8f849
No known key found for this signature in database
GPG key ID: C0207FF7EA146678
2 changed files with 166 additions and 0 deletions

View file

@ -25,7 +25,9 @@ package com.intellectualsites.commands;
import com.google.common.reflect.TypeToken;
import com.intellectualsites.commands.execution.CommandExecutionCoordinator;
import com.intellectualsites.commands.parsers.MaterialArgument;
import com.intellectualsites.commands.parsers.WorldArgument;
import org.bukkit.Material;
import org.bukkit.World;
import org.bukkit.command.CommandSender;
import org.bukkit.plugin.Plugin;
@ -70,6 +72,8 @@ public class BukkitCommandManager<C>
/* Register Bukkit parsers */
this.getParserRegistry().registerParserSupplier(TypeToken.of(World.class), params -> new WorldArgument.WorldParser<>());
this.getParserRegistry().registerParserSupplier(TypeToken.of(Material.class),
params -> new MaterialArgument.MaterialParser<>());
}
/**