From 36b1e38d4ca8623eb0d26539c7a9af6120583cc6 Mon Sep 17 00:00:00 2001 From: Dinnerbone Date: Wed, 29 Dec 2010 03:19:12 +0000 Subject: [PATCH] Location implements Cloneable --- src/org/bukkit/Location.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/org/bukkit/Location.java b/src/org/bukkit/Location.java index 6692bd0b..69329cd3 100644 --- a/src/org/bukkit/Location.java +++ b/src/org/bukkit/Location.java @@ -4,7 +4,7 @@ package org.bukkit; /** * Represents a 3-dimensional position in a world */ -public class Location { +public class Location implements Cloneable { private World world; private double x; private double y; @@ -179,4 +179,9 @@ public class Location { public String toString() { return "Location{" + "world=" + world + "x=" + x + "y=" + y + "z=" + z + "pitch=" + pitch + "yaw=" + yaw + '}'; } + + @Override + protected Location clone() { + return new Location(world, x, y, z, yaw, pitch); + } }