From d30cad63405a3e8fa55b0c53829ff3de0c1f834a Mon Sep 17 00:00:00 2001 From: TomyLobo Date: Tue, 9 Aug 2011 01:13:57 +0200 Subject: [PATCH] Added ORIENTATION_REGION and ALL LogModes, which log orientation+region and position+orientation+region respectively. --- .../com/sk89q/minecraft/util/commands/Logging.java | 6 ++++-- src/main/java/com/sk89q/worldedit/WorldEdit.java | 12 ++++++++++-- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/sk89q/minecraft/util/commands/Logging.java b/src/main/java/com/sk89q/minecraft/util/commands/Logging.java index 3ef9ed0a9..23564abf5 100644 --- a/src/main/java/com/sk89q/minecraft/util/commands/Logging.java +++ b/src/main/java/com/sk89q/minecraft/util/commands/Logging.java @@ -32,11 +32,13 @@ public @interface Logging { public enum LogMode { POSITION, // Player position REGION, // Region selection - PLACEMENT // Either the player position or pos1, depending on the placeAtPos1 flag + ORIENTATION_REGION, // player orientation and Region selection + PLACEMENT, // Either the player position or pos1, depending on the placeAtPos1 flag + ALL // Log all information available } /** - * Log mode. Can be either POSITION, REGION or PLACEMENT. + * Log mode. Can be either POSITION, REGION, ORIENTATION_REGION, PLACEMENT or ALL. */ LogMode value(); } diff --git a/src/main/java/com/sk89q/worldedit/WorldEdit.java b/src/main/java/com/sk89q/worldedit/WorldEdit.java index 57034e593..9b52981f0 100644 --- a/src/main/java/com/sk89q/worldedit/WorldEdit.java +++ b/src/main/java/com/sk89q/worldedit/WorldEdit.java @@ -136,11 +136,19 @@ public class WorldEdit { break; } /* FALL-THROUGH */ - + case POSITION: msg += " - Position: "+position; break; - + + case ALL: + msg += " - Position: "+position; + /* FALL-THROUGH */ + + case ORIENTATION_REGION: + msg += " - Orientation: "+player.getCardinalDirection().name(); + /* FALL-THROUGH */ + case REGION: try { msg += " - Region: "+session.getSelection(player.getWorld());