diff --git a/src/main/java/net/aufdemrand/denizen/events/core/CuboidEnterExitSmartEvent.java b/src/main/java/net/aufdemrand/denizen/events/core/CuboidEnterExitSmartEvent.java index 4541b6d3a9..d67b8640ab 100644 --- a/src/main/java/net/aufdemrand/denizen/events/core/CuboidEnterExitSmartEvent.java +++ b/src/main/java/net/aufdemrand/denizen/events/core/CuboidEnterExitSmartEvent.java @@ -143,8 +143,8 @@ public void playerMoveEvent(PlayerMoveEvent event) { // Look for cuboids that contain the block's location List cuboids = dCuboid.getNotableCuboidsContaining(event.getTo()); List match = new ArrayList(); - String namelow = CoreUtilities.toLowerCase(event.getPlayer().getName()); - if (player_cuboids.containsKey(namelow)) + String namelow = CoreUtilities.toLowerCase(event.getPlayer().getName()); // TODO: UUID? + if (player_cuboids.containsKey(namelow)) // TODO: Clear on quit? match = player_cuboids.get(namelow); List exits = new ArrayList(match); diff --git a/src/main/java/net/aufdemrand/denizen/objects/dCuboid.java b/src/main/java/net/aufdemrand/denizen/objects/dCuboid.java index 13324574ad..9c791cc36f 100644 --- a/src/main/java/net/aufdemrand/denizen/objects/dCuboid.java +++ b/src/main/java/net/aufdemrand/denizen/objects/dCuboid.java @@ -252,11 +252,11 @@ public boolean isInsideCuboid(Location location) { for (LocationPair pair : pairs) { if (!location.getWorld().equals(pair.low.getWorld())) continue; - if (!Utilities.isBetween(pair.low.getBlockX(), pair.high.getBlockX(), location.getBlockX())) + if (!Utilities.isBetween(pair.low.getBlockX(), pair.high.getBlockX() + 1, location.getBlockX())) continue; - if (!Utilities.isBetween(pair.low.getBlockY(), pair.high.getBlockY(), location.getBlockY())) + if (!Utilities.isBetween(pair.low.getBlockY(), pair.high.getBlockY() + 1, location.getBlockY())) continue; - if (Utilities.isBetween(pair.low.getBlockZ(), pair.high.getBlockZ(), location.getBlockZ())) + if (Utilities.isBetween(pair.low.getBlockZ(), pair.high.getBlockZ() + 1, location.getBlockZ())) return true; } diff --git a/src/main/java/net/aufdemrand/denizen/objects/dPlayer.java b/src/main/java/net/aufdemrand/denizen/objects/dPlayer.java index e6eabce512..f34e5257b6 100644 --- a/src/main/java/net/aufdemrand/denizen/objects/dPlayer.java +++ b/src/main/java/net/aufdemrand/denizen/objects/dPlayer.java @@ -1991,7 +1991,7 @@ public void adjust(Mechanism mechanism) { // Sets the time of day the Player is currently experiencing. Setting this will cause the // player to have a different time than other Players in the world are experiencing though // time will continue to progress. Using the 'reset_time' mechanism, or relogging your player - // will reset this mechanism to match the world's current time. Valid range is 0-28000 + // will reset this mechanism to match the world's current time. Valid range is 0-24000 // @tags // // --> @@ -2008,7 +2008,7 @@ public void adjust(Mechanism mechanism) { // there is a small 'twitch effect' when looking at the sky when time is frozen. // Setting this will cause the player to have a different time than other Players in // the world are experiencing. Using the 'reset_time' mechanism, or relogging your player - // will reset this mechanism to match the world's current time. Valid range is 0-28000 + // will reset this mechanism to match the world's current time. Valid range is 0-24000 // @tags // // --> diff --git a/src/main/java/net/aufdemrand/denizen/utilities/Utilities.java b/src/main/java/net/aufdemrand/denizen/utilities/Utilities.java index e2527734eb..ac477c57f2 100644 --- a/src/main/java/net/aufdemrand/denizen/utilities/Utilities.java +++ b/src/main/java/net/aufdemrand/denizen/utilities/Utilities.java @@ -142,7 +142,7 @@ public static int lastIndexOfUCL(String str) { * @return true if c is in between. */ public static boolean isBetween(double a, double b, double c) { - return a == c || b == c || (b > a ? c > a && c < b : c > b && c < a); + return b > a ? c >= a && c <= b: c >= b && c <= a; }