mirror of
https://github.com/Auxilor/EcoEnchants.git
synced 2025-02-18 04:51:20 +01:00
Changed /ecodebug to only send the held item - /ecodebug full now sends full output
This commit is contained in:
parent
d428f5642a
commit
bb23655af8
@ -37,6 +37,7 @@ public class CommandEcodebug extends AbstractCommand {
|
||||
@Override
|
||||
public void onExecute(@NotNull final CommandSender sender,
|
||||
@NotNull final List<String> args) {
|
||||
if (!args.isEmpty() && args.get(0).equalsIgnoreCase("full")) {
|
||||
Bukkit.getLogger().info("--------------- BEGIN DEBUG ----------------");
|
||||
if (sender instanceof Player) {
|
||||
Player player = (Player) sender;
|
||||
@ -124,5 +125,15 @@ public class CommandEcodebug extends AbstractCommand {
|
||||
+ ", NMS: " + ProxyConstants.NMS_VERSION);
|
||||
Bukkit.getLogger().info("Motd: " + Bukkit.getServer().getMotd());
|
||||
Bukkit.getLogger().info("--------------- END DEBUG ----------------");
|
||||
} else {
|
||||
if (sender instanceof Player) {
|
||||
Player player = (Player) sender;
|
||||
player.sendMessage("Held Item: " + player.getInventory().getItemInMainHand().toString());
|
||||
Bukkit.getLogger().info("");
|
||||
|
||||
Bukkit.getLogger().info("Held Item: " + player.getInventory().getItemInMainHand().toString());
|
||||
Bukkit.getLogger().info("");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user