summaryrefslogtreecommitdiffstats
path: root/src/main/java/org
diff options
context:
space:
mode:
authordurron597 <martin.jared@gmail.com>2011-01-02 05:50:26 -0500
committerdurron597 <martin.jared@gmail.com>2011-01-02 05:50:26 -0500
commit1c5d80a8ce45d0b4e88e8ef7383637f37bf325ae (patch)
tree919bd6fe675ebb086ff1d484307c789b92f320f7 /src/main/java/org
parente70828125001bd5f3b406d02ecb151eadf109754 (diff)
parent5c37168fc3c52e36b6fff0dc72806ac81345cd1f (diff)
downloadcraftbukkit-1c5d80a8ce45d0b4e88e8ef7383637f37bf325ae.tar
craftbukkit-1c5d80a8ce45d0b4e88e8ef7383637f37bf325ae.tar.gz
craftbukkit-1c5d80a8ce45d0b4e88e8ef7383637f37bf325ae.tar.lz
craftbukkit-1c5d80a8ce45d0b4e88e8ef7383637f37bf325ae.tar.xz
craftbukkit-1c5d80a8ce45d0b4e88e8ef7383637f37bf325ae.zip
Merge remote branch 'upstream/master' into HEAD
Diffstat (limited to 'src/main/java/org')
-rw-r--r--src/main/java/org/bukkit/craftbukkit/CraftArrowEntity.java15
-rw-r--r--src/main/java/org/bukkit/craftbukkit/CraftWorld.java15
2 files changed, 30 insertions, 0 deletions
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftArrowEntity.java b/src/main/java/org/bukkit/craftbukkit/CraftArrowEntity.java
new file mode 100644
index 00000000..337426d3
--- /dev/null
+++ b/src/main/java/org/bukkit/craftbukkit/CraftArrowEntity.java
@@ -0,0 +1,15 @@
+package org.bukkit.craftbukkit;
+
+import org.bukkit.ArrowEntity;
+import net.minecraft.server.EntityArrow;
+
+/**
+ * Represents an arrow.
+ *
+ * @author sk89q
+ */
+public class CraftArrowEntity extends CraftEntity implements ArrowEntity {
+ CraftArrowEntity(CraftServer server, EntityArrow entity) {
+ super(server, entity);
+ }
+}
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index 322065f2..5e00cbf8 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -4,8 +4,13 @@ package org.bukkit.craftbukkit;
import java.util.HashMap;
import java.util.Map;
import net.minecraft.server.WorldServer;
+import net.minecraft.server.EntityArrow;
+
+import org.bukkit.ArrowEntity;
import org.bukkit.Block;
import org.bukkit.Chunk;
+import org.bukkit.Location;
+import org.bukkit.Vector;
import org.bukkit.World;
public class CraftWorld implements World {
@@ -71,6 +76,16 @@ public class CraftWorld implements World {
}
@Override
+ public ArrowEntity spawnArrow(Location loc, Vector velocity, float speed,
+ float spread) {
+ EntityArrow arrow = new EntityArrow(world);
+ arrow.c(loc.getX(), loc.getY(), loc.getZ());
+ world.a(arrow);
+ arrow.a(velocity.getX(), velocity.getY(), velocity.getZ(), speed, spread);
+ return new CraftArrowEntity(world.getServer(), arrow);
+ }
+
+ @Override
public String toString() {
return "CraftWorld";
}