@Override public void run() { sender.printDebug(message); }
@Command( aliases = { "version", "ver" }, usage = "", desc = "Get WorldEdit version", min = 0, max = 0 ) public void version(Actor actor) throws WorldEditException { actor.print("WorldEdit version " + WorldEdit.getVersion()); actor.print("https://github.com/sk89q/worldedit/"); PlatformManager pm = we.getPlatformManager(); actor.printDebug("----------- Platforms -----------"); for (Platform platform : pm.getPlatforms()) { actor.printDebug(String.format("* %s (%s)", platform.getPlatformName(), platform.getPlatformVersion())); } actor.printDebug("----------- Capabilities -----------"); for (Capability capability : Capability.values()) { Platform platform = pm.queryCapability(capability); actor.printDebug(String.format("%s: %s", capability.name(), platform != null ? platform.getPlatformName() : "NONE")); } }
if (time > 0) { double throughput = changed / (time / 1000.0); actor.printDebug((time / 1000.0) + "s elapsed (history: " + changed + " changed; " + Math.round(throughput) + " blocks/sec)."); } else { actor.printDebug((time / 1000.0) + "s elapsed.");
/** * Publish a log record. */ @Override public void publish(LogRecord record) { player.printDebug(record.getLevel().getName() + ": " + Style.WHITE + record.getMessage()); } }
@Command(aliases = {"version"}, desc = "Get the WorldGuard version", max = 0) public void version(CommandContext args, Actor sender) throws CommandException { sender.print("WorldGuard " + WorldGuard.getVersion()); sender.print("http://www.enginehub.org"); sender.printDebug("----------- Platforms -----------"); sender.printDebug(String.format("* %s (%s)", worldGuard.getPlatform().getPlatformName(), worldGuard.getPlatform().getPlatformVersion())); }
/** * Warn the sender if the dimensions of the given region are worrying. * * @param sender the sender to send the message to * @param region the region */ protected static void warnAboutDimensions(Actor sender, ProtectedRegion region) { int height = region.getMaximumPoint().getBlockY() - region.getMinimumPoint().getBlockY(); if (height <= 2) { sender.printDebug("(Warning: The height of the region was " + (height + 1) + " block(s).)"); } }