From 2935f411735ba4dab2a39954ce0cbade35fa5082 Mon Sep 17 00:00:00 2001 From: Florian CUNY Date: Mon, 11 Mar 2019 13:41:01 +0100 Subject: [PATCH] Made Island#getCenter() return a clone of the Location As suggested in https://github.com/BentoBoxWorld/BentoBox/issues/591#issuecomment-471314358 --- .../world/bentobox/bentobox/database/objects/Island.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/java/world/bentobox/bentobox/database/objects/Island.java b/src/main/java/world/bentobox/bentobox/database/objects/Island.java index ce8264f4e..051a5054f 100644 --- a/src/main/java/world/bentobox/bentobox/database/objects/Island.java +++ b/src/main/java/world/bentobox/bentobox/database/objects/Island.java @@ -190,10 +190,11 @@ public class Island implements DataObject { } /** - * @return the center Location + * Returns a clone of the location of the center of this island. + * @return clone of the center Location */ public Location getCenter(){ - return center; + return center.clone(); } /**