From 06f0c354ab9f3b4db3f827cf07497a2748eb8ead Mon Sep 17 00:00:00 2001 From: Garbage Mule Date: Tue, 9 Aug 2011 23:48:25 +0200 Subject: [PATCH] Removing some unneeded classes --- .../garbagemule/MobArena/EntityPosition.java | 89 ------------------- .../garbagemule/MobArena/MAInventoryItem.java | 22 ----- .../MobArena/waves/RecurrentWave.java | 52 ----------- .../MobArena/waves/SingleWave.java | 40 --------- 4 files changed, 203 deletions(-) delete mode 100644 src/com/garbagemule/MobArena/EntityPosition.java delete mode 100644 src/com/garbagemule/MobArena/MAInventoryItem.java delete mode 100644 src/com/garbagemule/MobArena/waves/RecurrentWave.java delete mode 100644 src/com/garbagemule/MobArena/waves/SingleWave.java diff --git a/src/com/garbagemule/MobArena/EntityPosition.java b/src/com/garbagemule/MobArena/EntityPosition.java deleted file mode 100644 index 5ee96bb..0000000 --- a/src/com/garbagemule/MobArena/EntityPosition.java +++ /dev/null @@ -1,89 +0,0 @@ -package com.garbagemule.MobArena; - -import java.io.Serializable; -import org.bukkit.Location; -import org.bukkit.World; - -/** - * NOTE: I (garbagemule) DID NOT WRITE THIS CLASS (notice the author below) - * @author creadri - */ -@SuppressWarnings("serial") -public class EntityPosition implements Serializable{ - private double x; - private double y; - private double z; - private String world; - private float yaw; - private float pitch; - - public EntityPosition(double x, double y, double z, String world, float yaw, float pitch) { - this.x = x; - this.y = y; - this.z = z; - this.world = world; - this.yaw = yaw; - this.pitch = pitch; - } - - public EntityPosition(Location location) { - this.x = location.getX(); - this.y = location.getY(); - this.z = location.getZ(); - this.world = location.getWorld().getName(); - this.yaw = location.getYaw(); - this.pitch = location.getPitch(); - } - - public Location getLocation(World world) { - return new Location(world, x, y, z, yaw, pitch); - } - - public float getPitch() { - return pitch; - } - - public void setPitch(float pitch) { - this.pitch = pitch; - } - - public String getWorld() { - return world; - } - - public void setWorld(String world) { - this.world = world; - } - - public double getX() { - return x; - } - - public void setX(double x) { - this.x = x; - } - - public double getY() { - return y; - } - - public void setY(double y) { - this.y = y; - } - - public float getYaw() { - return yaw; - } - - public void setYaw(float yaw) { - this.yaw = yaw; - } - - public double getZ() { - return z; - } - - public void setZ(double z) { - this.z = z; - } -} \ No newline at end of file diff --git a/src/com/garbagemule/MobArena/MAInventoryItem.java b/src/com/garbagemule/MobArena/MAInventoryItem.java deleted file mode 100644 index ad33c45..0000000 --- a/src/com/garbagemule/MobArena/MAInventoryItem.java +++ /dev/null @@ -1,22 +0,0 @@ -package com.garbagemule.MobArena; - -import java.io.Serializable; - -public class MAInventoryItem implements Serializable -{ - private static final long serialVersionUID = 739709220350581510L; - private int typeId; - private int amount; - private short durability; - - public MAInventoryItem(int typeId, int amount, short durability) - { - this.typeId = typeId; - this.amount = amount; - this.durability = durability; - } - - public int getTypeId() { return typeId; } - public int getAmount() { return amount; } - public short getDurability() { return durability; } -} diff --git a/src/com/garbagemule/MobArena/waves/RecurrentWave.java b/src/com/garbagemule/MobArena/waves/RecurrentWave.java deleted file mode 100644 index dab265d..0000000 --- a/src/com/garbagemule/MobArena/waves/RecurrentWave.java +++ /dev/null @@ -1,52 +0,0 @@ -package com.garbagemule.MobArena.waves; - -import java.util.Collection; - -import org.bukkit.Location; - -public class RecurrentWave extends AbstractWave -{ - public RecurrentWave(String name, int wave, int frequency, int priority) - { - super(name, wave, frequency, priority); - } - - public RecurrentWave(String name, int wave, int frequency, int priority, WaveType type, WaveGrowth growth) - { - super(name, wave, frequency, priority, WaveBranch.RECURRENT, type, growth); - } - - public void spawn(int wave, Collection spawnpoints) - { - - } - - public void setDefault(boolean def) - { - - } - - public boolean matches(int wave) - { - if (wave < getWave()) - return false; - - return (wave - getWave()) % getFrequency() == 0; - } - - /** - * Recurrent waves are sorted by their priorities. - * If the priorities are equal, the names are compared. This is to - * ALLOW "duplicates" in the RECURRENT WAVES collection. - */ - /* - public int compareTo(Wave w) - { - if (getPriority() < w.getPriority()) - return -1; - else if (getPriority() > w.getPriority()) - return 1; - else return getName().compareTo(w.getName()); - } - */ -} diff --git a/src/com/garbagemule/MobArena/waves/SingleWave.java b/src/com/garbagemule/MobArena/waves/SingleWave.java deleted file mode 100644 index d37990e..0000000 --- a/src/com/garbagemule/MobArena/waves/SingleWave.java +++ /dev/null @@ -1,40 +0,0 @@ -package com.garbagemule.MobArena.waves; - -import java.util.Collection; - -import org.bukkit.Location; - -public class SingleWave extends AbstractWave -{ - public SingleWave(String name, int wave) - { - super(name, wave, 0, 0); - setBranch(WaveBranch.SINGLE); - } - - public void spawn(int wave, Collection spawnpoints) - { - - } - - public boolean matches(int wave) - { - return getWave() == wave; - } - - /** - * Single waves are compared by their wave numbers. - * If the wave numbers are equal, the waves are equal. This is to - * DISALLOW "duplicates" in the SINGLE WAVES collection. - */ - /* - public int compareTo(Wave w) - { - if (this.getWave() < w.getWave()) - return -1; - else if (this.getWave() > w.getWave()) - return 1; - else return 0; - } - */ -}