From a2a40ed26a96927f4ca4fcb4450373323a8c1dd9 Mon Sep 17 00:00:00 2001 From: SirYwell Date: Fri, 25 Feb 2022 14:51:18 +0100 Subject: [PATCH] delegate to hashCode directly instead of single parameter calls --- .../src/main/java/com/plotsquared/bukkit/util/BukkitWorld.java | 2 +- Core/src/main/java/com/plotsquared/core/plot/PlotWorld.java | 2 +- .../main/java/com/plotsquared/core/plot/flag/FlagContainer.java | 2 +- Core/src/main/java/com/plotsquared/core/plot/flag/PlotFlag.java | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Bukkit/src/main/java/com/plotsquared/bukkit/util/BukkitWorld.java b/Bukkit/src/main/java/com/plotsquared/bukkit/util/BukkitWorld.java index 75bca02ee..38a343780 100644 --- a/Bukkit/src/main/java/com/plotsquared/bukkit/util/BukkitWorld.java +++ b/Bukkit/src/main/java/com/plotsquared/bukkit/util/BukkitWorld.java @@ -97,7 +97,7 @@ public class BukkitWorld implements World { @Override public int hashCode() { - return Objects.hash(world); + return world.hashCode(); } /** diff --git a/Core/src/main/java/com/plotsquared/core/plot/PlotWorld.java b/Core/src/main/java/com/plotsquared/core/plot/PlotWorld.java index 8afb4f649..dc78223f3 100644 --- a/Core/src/main/java/com/plotsquared/core/plot/PlotWorld.java +++ b/Core/src/main/java/com/plotsquared/core/plot/PlotWorld.java @@ -119,7 +119,7 @@ public abstract class PlotWorld { @Override public int hashCode() { - return Objects.hash(world); + return world.hashCode(); } /** diff --git a/Core/src/main/java/com/plotsquared/core/plot/flag/FlagContainer.java b/Core/src/main/java/com/plotsquared/core/plot/flag/FlagContainer.java index d03b77982..654acbe0a 100644 --- a/Core/src/main/java/com/plotsquared/core/plot/flag/FlagContainer.java +++ b/Core/src/main/java/com/plotsquared/core/plot/flag/FlagContainer.java @@ -385,7 +385,7 @@ public class FlagContainer { @Override public int hashCode() { - return Objects.hash(flagMap); + return flagMap.hashCode(); } /** diff --git a/Core/src/main/java/com/plotsquared/core/plot/flag/PlotFlag.java b/Core/src/main/java/com/plotsquared/core/plot/flag/PlotFlag.java index 65878ae19..c9cf5b1dc 100644 --- a/Core/src/main/java/com/plotsquared/core/plot/flag/PlotFlag.java +++ b/Core/src/main/java/com/plotsquared/core/plot/flag/PlotFlag.java @@ -215,7 +215,7 @@ public abstract class PlotFlag> { @Override public int hashCode() { - return Objects.hash(value); + return value.hashCode(); } /**