diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Debug.java b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Debug.java index fdc44e5c7..c1970f969 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Debug.java +++ b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Debug.java @@ -7,11 +7,20 @@ import com.github.intellectualsites.plotsquared.plot.object.PlotPlayer; import com.github.intellectualsites.plotsquared.plot.util.MainUtil; import com.github.intellectualsites.plotsquared.plot.util.StringMan; +import java.util.Map; + @CommandDeclaration(command = "debug", category = CommandCategory.DEBUG, description = "Show debug information", usage = "/plot debug [msg]", permission = "plots.admin") public class Debug extends SubCommand { @Override public boolean onCommand(PlotPlayer player, String[] args) { + if ((args.length > 0) && "player".equalsIgnoreCase(args[1])) { + for (Map.Entry meta : player.getMeta().entrySet()) { + MainUtil.sendMessage(player, + "Key: " + meta.getKey() + " Value: " + meta.getValue().toString() + " , "); + } + ; + } if ((args.length > 0) && args[0].equalsIgnoreCase("msg")) { StringBuilder msg = new StringBuilder(); for (Captions caption : Captions.values()) { diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/PlotPlayer.java b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/PlotPlayer.java index 09bc364f1..8981b2923 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/PlotPlayer.java +++ b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/PlotPlayer.java @@ -118,6 +118,9 @@ public abstract class PlotPlayer implements CommandCaller, OfflinePlotPlayer { return meta; } + public ConcurrentHashMap getMeta() { + return meta; + } /** * Delete the metadata for a key. * - metadata is session only