2021-08-24 19:54:46 -05:00
|
|
|
package net.nuggetmc.tplus.command.commands;
|
|
|
|
|
|
|
|
|
|
import net.nuggetmc.tplus.TerminatorPlus;
|
|
|
|
|
import net.nuggetmc.tplus.bot.Bot;
|
|
|
|
|
import net.nuggetmc.tplus.bot.BotManager;
|
|
|
|
|
import net.nuggetmc.tplus.bot.agent.legacyagent.EnumTargetGoal;
|
|
|
|
|
import net.nuggetmc.tplus.bot.agent.legacyagent.LegacyAgent;
|
|
|
|
|
import net.nuggetmc.tplus.command.CommandHandler;
|
|
|
|
|
import net.nuggetmc.tplus.command.CommandInstance;
|
|
|
|
|
import net.nuggetmc.tplus.command.annotation.Autofill;
|
|
|
|
|
import net.nuggetmc.tplus.command.annotation.Command;
|
|
|
|
|
import net.nuggetmc.tplus.utils.ChatUtils;
|
|
|
|
|
import net.nuggetmc.tplus.utils.Debugger;
|
2021-07-21 13:52:21 -05:00
|
|
|
import org.bukkit.Bukkit;
|
|
|
|
|
import org.bukkit.ChatColor;
|
|
|
|
|
import org.bukkit.Location;
|
2021-08-25 02:49:31 +01:00
|
|
|
import org.bukkit.Material;
|
2021-08-25 00:42:42 -05:00
|
|
|
import org.bukkit.command.CommandSender;
|
2021-07-21 13:52:21 -05:00
|
|
|
import org.bukkit.entity.Player;
|
2021-08-25 00:42:42 -05:00
|
|
|
import org.bukkit.inventory.ItemStack;
|
2021-07-21 13:52:21 -05:00
|
|
|
import org.bukkit.scheduler.BukkitScheduler;
|
|
|
|
|
import org.bukkit.util.Vector;
|
|
|
|
|
|
|
|
|
|
import java.text.DecimalFormat;
|
2021-07-21 17:18:36 -05:00
|
|
|
import java.util.ArrayList;
|
2021-08-21 13:36:10 -05:00
|
|
|
import java.util.Arrays;
|
2021-07-21 17:18:36 -05:00
|
|
|
import java.util.List;
|
2021-07-21 13:52:21 -05:00
|
|
|
|
|
|
|
|
public class BotCommand extends CommandInstance {
|
|
|
|
|
|
|
|
|
|
private final TerminatorPlus plugin;
|
2021-08-21 13:36:10 -05:00
|
|
|
private final CommandHandler handler;
|
2021-07-21 13:52:21 -05:00
|
|
|
private final BotManager manager;
|
2021-08-21 13:36:10 -05:00
|
|
|
private final LegacyAgent agent;
|
2021-07-21 13:52:21 -05:00
|
|
|
private final BukkitScheduler scheduler;
|
|
|
|
|
private final DecimalFormat formatter;
|
|
|
|
|
|
2021-07-24 23:34:07 -05:00
|
|
|
private AICommand aiManager;
|
|
|
|
|
|
2021-08-24 19:54:46 -05:00
|
|
|
public BotCommand(CommandHandler handler, String name, String description, String... aliases) {
|
|
|
|
|
super(handler, name, description, aliases);
|
2021-07-21 13:52:21 -05:00
|
|
|
|
2021-08-21 13:36:10 -05:00
|
|
|
this.handler = commandHandler;
|
2021-07-21 13:52:21 -05:00
|
|
|
this.plugin = TerminatorPlus.getInstance();
|
|
|
|
|
this.manager = plugin.getManager();
|
2021-08-21 13:36:10 -05:00
|
|
|
this.agent = (LegacyAgent) manager.getAgent();
|
2021-07-21 13:52:21 -05:00
|
|
|
this.scheduler = Bukkit.getScheduler();
|
|
|
|
|
this.formatter = new DecimalFormat("0.##");
|
2021-08-21 13:36:10 -05:00
|
|
|
}
|
2021-07-24 23:34:07 -05:00
|
|
|
|
2021-08-24 19:54:46 -05:00
|
|
|
@Command
|
|
|
|
|
public void root(CommandSender sender, List<String> args) {
|
2021-07-21 17:18:36 -05:00
|
|
|
commandHandler.sendRootInfo(this, sender);
|
2021-07-21 13:52:21 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Command(
|
|
|
|
|
name = "create",
|
|
|
|
|
desc = "Create a bot.",
|
|
|
|
|
usage = "<name> [skin]"
|
|
|
|
|
)
|
2021-08-24 19:54:46 -05:00
|
|
|
public void create(CommandSender sender, List<String> args) {
|
|
|
|
|
if (!(sender instanceof Player)) {
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (args.isEmpty()) {
|
|
|
|
|
commandHandler.sendUsage(sender, this, "create <name> [skin]");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
String skin;
|
|
|
|
|
|
|
|
|
|
if (args.size() < 2) {
|
|
|
|
|
skin = null;
|
|
|
|
|
} else {
|
|
|
|
|
skin = args.get(1);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
manager.createBots((Player) sender, args.get(0), skin, 1);
|
2021-07-21 13:52:21 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Command(
|
|
|
|
|
name = "multi",
|
|
|
|
|
desc = "Create multiple bots at once.",
|
|
|
|
|
usage = "<amount> <name> [skin]"
|
|
|
|
|
)
|
2021-08-24 19:54:46 -05:00
|
|
|
public void multi(CommandSender sender, List<String> args) {
|
|
|
|
|
if (!(sender instanceof Player)) {
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (args.size() < 2) {
|
|
|
|
|
commandHandler.sendUsage(sender, this, "multi <amount> <name> [skin]");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
String skin;
|
|
|
|
|
|
|
|
|
|
if (args.size() < 3) {
|
|
|
|
|
skin = null;
|
|
|
|
|
} else {
|
|
|
|
|
skin = args.get(2);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
int n;
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
n = Integer.parseInt(args.get(0));
|
|
|
|
|
} catch (NumberFormatException e) {
|
|
|
|
|
sender.sendMessage("The amount must be an integer!");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
manager.createBots((Player) sender, args.get(1), skin, n);
|
2021-07-21 13:52:21 -05:00
|
|
|
}
|
|
|
|
|
|
2021-08-25 02:49:31 +01:00
|
|
|
@Command(
|
|
|
|
|
name = "give",
|
2021-08-25 00:42:42 -05:00
|
|
|
desc = "Gives a specified item to all bots.",
|
2021-08-25 02:49:31 +01:00
|
|
|
usage = "<item>"
|
|
|
|
|
)
|
|
|
|
|
public void give(CommandSender sender, List<String> args) {
|
2021-08-25 00:42:42 -05:00
|
|
|
if (args.isEmpty()) {
|
|
|
|
|
commandHandler.sendUsage(sender, this, "give <item>");
|
|
|
|
|
return;
|
|
|
|
|
}
|
2021-08-25 03:55:30 +01:00
|
|
|
|
2021-08-25 00:42:42 -05:00
|
|
|
String itemName = args.get(0);
|
|
|
|
|
Material type = Material.matchMaterial(itemName);
|
|
|
|
|
|
|
|
|
|
if (type == null) {
|
|
|
|
|
sender.sendMessage("The item " + ChatColor.YELLOW + itemName + ChatColor.RESET + " is not valid!");
|
|
|
|
|
return;
|
2021-08-25 03:55:30 +01:00
|
|
|
}
|
2021-08-25 00:42:42 -05:00
|
|
|
|
|
|
|
|
ItemStack item = new ItemStack(type);
|
|
|
|
|
|
|
|
|
|
manager.fetch().forEach(bot -> bot.setDefaultItem(item));
|
|
|
|
|
|
|
|
|
|
sender.sendMessage("Successfully set the default item to " + ChatColor.YELLOW + item.getType() + ChatColor.RESET + " for all current bots.");
|
2021-08-25 02:49:31 +01:00
|
|
|
}
|
|
|
|
|
|
2021-08-25 17:33:21 +01:00
|
|
|
@Command(
|
|
|
|
|
name = "armor",
|
|
|
|
|
desc = "Gives all bots an armor set.",
|
2021-08-25 22:23:14 +01:00
|
|
|
usage = "<armor tier>"
|
2021-08-25 17:33:21 +01:00
|
|
|
)
|
|
|
|
|
public void armor(CommandSender sender, List<String> args) {
|
2021-08-25 22:23:14 +01:00
|
|
|
String tier = args.get(0).toLowerCase();
|
2021-08-25 17:33:21 +01:00
|
|
|
|
2021-08-25 22:23:14 +01:00
|
|
|
ItemStack[] armorLeather = new ItemStack[4];
|
|
|
|
|
armorLeather[0] = new ItemStack(Material.LEATHER_BOOTS);
|
|
|
|
|
armorLeather[1] = new ItemStack(Material.LEATHER_LEGGINGS);
|
|
|
|
|
armorLeather[2] = new ItemStack(Material.LEATHER_CHESTPLATE);
|
|
|
|
|
armorLeather[3] = new ItemStack(Material.LEATHER_HELMET);
|
|
|
|
|
|
|
|
|
|
ItemStack[] armorChain = new ItemStack[4];
|
|
|
|
|
armorChain[0] = new ItemStack(Material.CHAINMAIL_BOOTS);
|
|
|
|
|
armorChain[1] = new ItemStack(Material.CHAINMAIL_LEGGINGS);
|
|
|
|
|
armorChain[2] = new ItemStack(Material.CHAINMAIL_CHESTPLATE);
|
|
|
|
|
armorChain[3] = new ItemStack(Material.CHAINMAIL_HELMET);
|
|
|
|
|
|
|
|
|
|
ItemStack[] armorGold = new ItemStack[4];
|
|
|
|
|
armorGold[0] = new ItemStack(Material.GOLDEN_BOOTS);
|
|
|
|
|
armorGold[1] = new ItemStack(Material.GOLDEN_LEGGINGS);
|
|
|
|
|
armorGold[2] = new ItemStack(Material.GOLDEN_CHESTPLATE);
|
|
|
|
|
armorGold[3] = new ItemStack(Material.GOLDEN_HELMET);
|
|
|
|
|
|
|
|
|
|
ItemStack[] armorIron = new ItemStack[4];
|
|
|
|
|
armorIron[0] = new ItemStack(Material.IRON_BOOTS);
|
|
|
|
|
armorIron[1] = new ItemStack(Material.IRON_LEGGINGS);
|
|
|
|
|
armorIron[2] = new ItemStack(Material.IRON_CHESTPLATE);
|
|
|
|
|
armorIron[3] = new ItemStack(Material.IRON_HELMET);
|
|
|
|
|
|
|
|
|
|
ItemStack[] armorDiamond = new ItemStack[4];
|
|
|
|
|
armorDiamond[0] = new ItemStack(Material.DIAMOND_BOOTS);
|
|
|
|
|
armorDiamond[1] = new ItemStack(Material.DIAMOND_LEGGINGS);
|
|
|
|
|
armorDiamond[2] = new ItemStack(Material.DIAMOND_CHESTPLATE);
|
|
|
|
|
armorDiamond[3] = new ItemStack(Material.DIAMOND_HELMET);
|
|
|
|
|
|
|
|
|
|
ItemStack[] armorNetherite = new ItemStack[4];
|
|
|
|
|
armorNetherite[0] = new ItemStack(Material.NETHERITE_BOOTS);
|
|
|
|
|
armorNetherite[1] = new ItemStack(Material.NETHERITE_LEGGINGS);
|
|
|
|
|
armorNetherite[2] = new ItemStack(Material.NETHERITE_CHESTPLATE);
|
|
|
|
|
armorNetherite[3] = new ItemStack(Material.NETHERITE_HELMET);
|
|
|
|
|
|
|
|
|
|
ItemStack[] armor;
|
|
|
|
|
|
|
|
|
|
switch(tier) {
|
|
|
|
|
case "leather":
|
2021-08-25 17:33:21 +01:00
|
|
|
armor = armorLeather;
|
|
|
|
|
break;
|
2021-08-25 22:23:14 +01:00
|
|
|
case "chain":
|
|
|
|
|
armor = armorChain;
|
|
|
|
|
break;
|
|
|
|
|
case "gold":
|
2021-08-25 17:33:21 +01:00
|
|
|
armor = armorGold;
|
|
|
|
|
break;
|
2021-08-25 22:23:14 +01:00
|
|
|
case "iron":
|
|
|
|
|
armor = armorIron;
|
|
|
|
|
break;
|
|
|
|
|
case "diamond":
|
|
|
|
|
armor = armorDiamond;
|
|
|
|
|
break;
|
|
|
|
|
case "netherite":
|
|
|
|
|
armor = armorNetherite;
|
|
|
|
|
break;
|
2021-08-25 17:33:21 +01:00
|
|
|
default:
|
2021-08-25 22:23:14 +01:00
|
|
|
sender.sendMessage(ChatColor.RED + tier + ChatColor.RESET + " is not valid!");
|
|
|
|
|
sender.sendMessage("Available Tiers: " + ChatColor.AQUA + "leather, chain, iron, gold, diamond, netherite");
|
|
|
|
|
return;
|
2021-08-25 17:33:21 +01:00
|
|
|
}
|
|
|
|
|
|
2021-08-25 22:23:14 +01:00
|
|
|
manager.fetch().forEach(bot -> {
|
|
|
|
|
bot.getBukkitEntity().getInventory().setArmorContents(armor);
|
|
|
|
|
bot.getBukkitEntity().updateInventory();
|
|
|
|
|
});
|
|
|
|
|
sender.sendMessage("Successfully set the armor tier to " + ChatColor.GREEN + tier + ChatColor.RESET + " for all current bots.");
|
2021-08-25 17:33:21 +01:00
|
|
|
}
|
2021-08-25 16:16:50 +01:00
|
|
|
|
2021-07-21 13:52:21 -05:00
|
|
|
@Command(
|
|
|
|
|
name = "info",
|
|
|
|
|
desc = "Information about loaded bots.",
|
2021-07-24 23:34:07 -05:00
|
|
|
usage = "[name]",
|
|
|
|
|
autofill = "infoAutofill"
|
2021-07-21 13:52:21 -05:00
|
|
|
)
|
2021-08-24 19:54:46 -05:00
|
|
|
public void info(CommandSender sender, List<String> args) {
|
|
|
|
|
if (args.isEmpty()) {
|
|
|
|
|
commandHandler.sendUsage(sender, this, "info <name>");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
String name = args.get(0);
|
|
|
|
|
|
2021-07-21 13:52:21 -05:00
|
|
|
if (name == null) {
|
|
|
|
|
sender.sendMessage(ChatColor.YELLOW + "Bot GUI coming soon!");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
sender.sendMessage("Processing request...");
|
|
|
|
|
|
|
|
|
|
scheduler.runTaskAsynchronously(plugin, () -> {
|
|
|
|
|
try {
|
|
|
|
|
Bot bot = manager.getFirst(name);
|
|
|
|
|
|
|
|
|
|
if (bot == null) {
|
|
|
|
|
sender.sendMessage("Could not find bot " + ChatColor.GREEN + name + ChatColor.RESET + "!");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* time created
|
|
|
|
|
* current life (how long it has lived for)
|
|
|
|
|
* health
|
|
|
|
|
* inventory
|
|
|
|
|
* current target
|
|
|
|
|
* current kills
|
|
|
|
|
* skin
|
2021-08-21 13:36:10 -05:00
|
|
|
* neural network values (network name if loaded, otherwise RANDOM)
|
2021-07-21 13:52:21 -05:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
String botName = bot.getName();
|
|
|
|
|
String world = ChatColor.YELLOW + bot.getBukkitEntity().getWorld().getName();
|
|
|
|
|
Location loc = bot.getLocation();
|
|
|
|
|
String strLoc = ChatColor.YELLOW + formatter.format(loc.getBlockX()) + ", " + formatter.format(loc.getBlockY()) + ", " + formatter.format(loc.getBlockZ());
|
|
|
|
|
Vector vel = bot.getVelocity();
|
|
|
|
|
String strVel = ChatColor.AQUA + formatter.format(vel.getX()) + ", " + formatter.format(vel.getY()) + ", " + formatter.format(vel.getZ());
|
|
|
|
|
|
|
|
|
|
sender.sendMessage(ChatUtils.LINE);
|
|
|
|
|
sender.sendMessage(ChatColor.GREEN + botName);
|
|
|
|
|
sender.sendMessage(ChatUtils.BULLET_FORMATTED + "World: " + world);
|
|
|
|
|
sender.sendMessage(ChatUtils.BULLET_FORMATTED + "Position: " + strLoc);
|
|
|
|
|
sender.sendMessage(ChatUtils.BULLET_FORMATTED + "Velocity: " + strVel);
|
|
|
|
|
sender.sendMessage(ChatUtils.LINE);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
catch (Exception e) {
|
2021-07-24 23:34:07 -05:00
|
|
|
sender.sendMessage(ChatUtils.EXCEPTION_MESSAGE);
|
2021-07-21 13:52:21 -05:00
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
2021-08-21 13:36:10 -05:00
|
|
|
@Autofill
|
2021-07-24 23:34:07 -05:00
|
|
|
public List<String> infoAutofill(CommandSender sender, String[] args) {
|
2021-08-21 13:36:10 -05:00
|
|
|
return args.length == 2 ? manager.fetchNames() : null;
|
2021-07-24 23:34:07 -05:00
|
|
|
}
|
|
|
|
|
|
2021-07-21 13:52:21 -05:00
|
|
|
@Command(
|
|
|
|
|
name = "reset",
|
|
|
|
|
desc = "Remove all loaded bots."
|
|
|
|
|
)
|
2021-08-24 19:54:46 -05:00
|
|
|
public void reset(CommandSender sender, List<String> args) {
|
2021-07-21 13:52:21 -05:00
|
|
|
sender.sendMessage("Removing every bot...");
|
|
|
|
|
int size = manager.fetch().size();
|
|
|
|
|
manager.reset();
|
2021-08-24 19:54:46 -05:00
|
|
|
sender.sendMessage("Removed " + ChatColor.RED + ChatUtils.NUMBER_FORMAT.format(size) + ChatColor.RESET + " entit" + (size == 1 ? "y" : "ies") + ".");
|
|
|
|
|
|
|
|
|
|
if (aiManager == null) {
|
|
|
|
|
this.aiManager = (AICommand) handler.getCommand("ai");
|
|
|
|
|
}
|
2021-07-24 23:34:07 -05:00
|
|
|
|
2021-08-24 19:54:46 -05:00
|
|
|
if (aiManager != null && aiManager.hasActiveSession()) {
|
2021-07-24 23:34:07 -05:00
|
|
|
Bukkit.dispatchCommand(sender, "ai stop");
|
|
|
|
|
}
|
2021-07-21 13:52:21 -05:00
|
|
|
}
|
2021-07-21 17:18:36 -05:00
|
|
|
|
|
|
|
|
@Command(
|
2021-08-21 13:36:10 -05:00
|
|
|
name = "settings",
|
2021-07-21 17:18:36 -05:00
|
|
|
desc = "Make changes to the global configuration file and bot-specific settings.",
|
2021-08-21 13:36:10 -05:00
|
|
|
aliases = "options",
|
|
|
|
|
autofill = "settingsAutofill"
|
2021-07-21 17:18:36 -05:00
|
|
|
)
|
2021-08-24 19:54:46 -05:00
|
|
|
public void settings(CommandSender sender, List<String> args) {
|
|
|
|
|
String arg1 = args.isEmpty() ? null : args.get(0);
|
|
|
|
|
String arg2 = args.size() < 2 ? null : args.get(1);
|
|
|
|
|
|
2021-08-21 13:36:10 -05:00
|
|
|
String extra = ChatColor.GRAY + " [" + ChatColor.YELLOW + "/bot settings" + ChatColor.GRAY + "]";
|
|
|
|
|
|
|
|
|
|
if (arg1 == null || !arg1.equals("setgoal")) {
|
|
|
|
|
sender.sendMessage(ChatUtils.LINE);
|
|
|
|
|
sender.sendMessage(ChatColor.GOLD + "Bot Settings" + extra);
|
|
|
|
|
sender.sendMessage(ChatUtils.BULLET_FORMATTED + ChatColor.YELLOW + "setgoal" + ChatUtils.BULLET_FORMATTED + "Set the global bot target selection method.");
|
|
|
|
|
sender.sendMessage(ChatUtils.LINE);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
EnumTargetGoal goal = EnumTargetGoal.from(arg2 == null ? "" : arg2);
|
|
|
|
|
|
|
|
|
|
if (goal == null) {
|
|
|
|
|
sender.sendMessage(ChatUtils.LINE);
|
|
|
|
|
sender.sendMessage(ChatColor.GOLD + "Goal Selection Types" + extra);
|
|
|
|
|
Arrays.stream(EnumTargetGoal.values()).forEach(g -> sender.sendMessage(ChatUtils.BULLET_FORMATTED + ChatColor.YELLOW + g.name().replace("_", "").toLowerCase()
|
|
|
|
|
+ ChatUtils.BULLET_FORMATTED + g.description()));
|
|
|
|
|
sender.sendMessage(ChatUtils.LINE);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
agent.setTargetType(goal);
|
|
|
|
|
|
|
|
|
|
sender.sendMessage("The global bot goal has been set to " + ChatColor.BLUE + goal.name() + ChatColor.RESET + ".");
|
2021-07-21 17:18:36 -05:00
|
|
|
}
|
|
|
|
|
|
2021-08-21 13:36:10 -05:00
|
|
|
@Autofill
|
|
|
|
|
public List<String> settingsAutofill(CommandSender sender, String[] args) {
|
2021-07-21 17:18:36 -05:00
|
|
|
List<String> output = new ArrayList<>();
|
|
|
|
|
|
2021-08-21 13:36:10 -05:00
|
|
|
// More settings:
|
|
|
|
|
// setitem
|
|
|
|
|
// tpall
|
|
|
|
|
// tprandom
|
|
|
|
|
// hidenametags or nametags <show/hide>
|
|
|
|
|
// sitall
|
|
|
|
|
// lookall
|
|
|
|
|
|
2021-07-21 17:18:36 -05:00
|
|
|
if (args.length == 2) {
|
|
|
|
|
output.add("setgoal");
|
2021-08-21 13:36:10 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
else if (args.length == 3) {
|
|
|
|
|
if (args[1].equalsIgnoreCase("setgoal")) {
|
|
|
|
|
Arrays.stream(EnumTargetGoal.values()).forEach(goal -> output.add(goal.name().replace("_", "").toLowerCase()));
|
|
|
|
|
}
|
2021-07-21 17:18:36 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return output;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Command(
|
|
|
|
|
name = "debug",
|
|
|
|
|
desc = "Debug plugin code.",
|
|
|
|
|
usage = "<expression>",
|
|
|
|
|
visible = false
|
|
|
|
|
)
|
2021-08-24 19:54:46 -05:00
|
|
|
public void debug(CommandSender sender, List<String> args) {
|
|
|
|
|
if (args.isEmpty()) {
|
|
|
|
|
commandHandler.sendUsage(sender, this, "debug <expression>");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
new Debugger(sender).execute(args.get(0));
|
2021-07-21 17:18:36 -05:00
|
|
|
}
|
2021-07-21 13:52:21 -05:00
|
|
|
}
|