Made Island#getCenter() return a clone of the Location

As suggested in https://github.com/BentoBoxWorld/BentoBox/issues/591#issuecomment-471314358
This commit is contained in:
Florian CUNY 2019-03-11 13:41:01 +01:00
parent 75bbc13cf5
commit 2935f41173

View File

@ -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(){ public Location getCenter(){
return center; return center.clone();
} }
/** /**