From af93530dbe9f420be20aa490d33c3fafb997aa0d Mon Sep 17 00:00:00 2001 From: wizjany Date: Fri, 1 Mar 2019 21:42:07 -0500 Subject: [PATCH] Fix region equality across multiple region managers. (#395) It is possible, for example when teleporting between two worlds, that regions in two different managers are compared. If the regions in each world have the same name, they would return equal. Removing the equals override will prevent two different regions from seeming equal even if they are not. --- config/checkstyle/checkstyle.xml | 4 +++ config/checkstyle/suppressions.xml | 7 +++++ .../protection/regions/ProtectedRegion.java | 29 +++++++++---------- 3 files changed, 24 insertions(+), 16 deletions(-) create mode 100644 config/checkstyle/suppressions.xml diff --git a/config/checkstyle/checkstyle.xml b/config/checkstyle/checkstyle.xml index 5fc398e9..9d3768f2 100644 --- a/config/checkstyle/checkstyle.xml +++ b/config/checkstyle/checkstyle.xml @@ -6,6 +6,10 @@ + + + + diff --git a/config/checkstyle/suppressions.xml b/config/checkstyle/suppressions.xml new file mode 100644 index 00000000..f0179196 --- /dev/null +++ b/config/checkstyle/suppressions.xml @@ -0,0 +1,7 @@ + + + + + \ No newline at end of file diff --git a/worldguard-core/src/main/java/com/sk89q/worldguard/protection/regions/ProtectedRegion.java b/worldguard-core/src/main/java/com/sk89q/worldguard/protection/regions/ProtectedRegion.java index c5989bb0..18de660d 100644 --- a/worldguard-core/src/main/java/com/sk89q/worldguard/protection/regions/ProtectedRegion.java +++ b/worldguard-core/src/main/java/com/sk89q/worldguard/protection/regions/ProtectedRegion.java @@ -299,7 +299,7 @@ public abstract class ProtectedRegion implements ChangeTracked, Comparable