From 0cb557d9221d8433cea8c71e64813f7051d80265 Mon Sep 17 00:00:00 2001 From: NewGarbo Date: Wed, 3 Feb 2016 17:02:06 +0000 Subject: [PATCH] moved some stuff around and slight changes --- .../game/clans/clans/siege/SiegeManager.java | 4 +- .../siege/outpost/CommandSiegeSupplies.java | 4 +- .../clans/clans/siege/outpost/Outpost.java | 2 +- .../clans/clans/siege/weapon/AccessType.java | 7 -- .../siege/{cannon => weapon}/Cannon.java | 15 ++--- .../siege/{catapult => weapon}/Catapult.java | 23 ++++--- .../clans/clans/siege/weapon/SiegeWeapon.java | 67 ++++++++++++++----- .../siege/weapon/{ => projectile}/Crater.java | 5 +- .../weapon/{ => projectile}/CraterBlock.java | 2 +- .../ProjectileAttributes.java | 2 +- .../{ => projectile}/ProjectileType.java | 2 +- .../{ => projectile}/WeaponProjectile.java | 11 +-- .../siege/weapon/{ => util}/AccessRule.java | 2 +- .../clans/siege/weapon/util/AccessType.java | 7 ++ .../util}/BarrierCollisionBox.java | 4 +- .../weapon/{ => util}/WeaponStateInfo.java | 2 +- 16 files changed, 93 insertions(+), 66 deletions(-) delete mode 100644 Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/siege/weapon/AccessType.java rename Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/siege/{cannon => weapon}/Cannon.java (91%) rename Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/siege/{catapult => weapon}/Catapult.java (89%) rename Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/siege/weapon/{ => projectile}/Crater.java (95%) rename Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/siege/weapon/{ => projectile}/CraterBlock.java (90%) rename Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/siege/weapon/{ => projectile}/ProjectileAttributes.java (95%) rename Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/siege/weapon/{ => projectile}/ProjectileType.java (50%) rename Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/siege/weapon/{ => projectile}/WeaponProjectile.java (93%) rename Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/siege/weapon/{ => util}/AccessRule.java (87%) create mode 100644 Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/siege/weapon/util/AccessType.java rename Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/siege/{ => weapon/util}/BarrierCollisionBox.java (98%) rename Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/siege/weapon/{ => util}/WeaponStateInfo.java (85%) diff --git a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/siege/SiegeManager.java b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/siege/SiegeManager.java index b348a32bb..2f8c8e4e6 100644 --- a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/siege/SiegeManager.java +++ b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/siege/SiegeManager.java @@ -11,10 +11,10 @@ import mineplex.core.common.util.F; import mineplex.core.common.util.UtilInv; import mineplex.core.common.util.UtilPlayer; import mineplex.game.clans.clans.ClansManager; -import mineplex.game.clans.clans.siege.cannon.Cannon; -import mineplex.game.clans.clans.siege.catapult.Catapult; import mineplex.game.clans.clans.siege.outpost.CommandSiegeSupplies; import mineplex.game.clans.clans.siege.outpost.OutpostManager; +import mineplex.game.clans.clans.siege.weapon.Cannon; +import mineplex.game.clans.clans.siege.weapon.Catapult; public class SiegeManager extends MiniPlugin { diff --git a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/siege/outpost/CommandSiegeSupplies.java b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/siege/outpost/CommandSiegeSupplies.java index 86ed92e0d..4de674758 100644 --- a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/siege/outpost/CommandSiegeSupplies.java +++ b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/siege/outpost/CommandSiegeSupplies.java @@ -7,8 +7,8 @@ import mineplex.core.command.CommandBase; import mineplex.core.common.Rank; import mineplex.core.common.util.F; import mineplex.core.common.util.UtilPlayer; -import mineplex.game.clans.clans.siege.cannon.Cannon; -import mineplex.game.clans.clans.siege.catapult.Catapult; +import mineplex.game.clans.clans.siege.weapon.Cannon; +import mineplex.game.clans.clans.siege.weapon.Catapult; public class CommandSiegeSupplies extends CommandBase { diff --git a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/siege/outpost/Outpost.java b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/siege/outpost/Outpost.java index 473b54a4c..1a6be7234 100644 --- a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/siege/outpost/Outpost.java +++ b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/siege/outpost/Outpost.java @@ -48,7 +48,7 @@ import mineplex.core.updater.UpdateType; import mineplex.core.updater.event.UpdateEvent; import mineplex.game.clans.clans.ClanInfo; import mineplex.game.clans.clans.ClansBlacklist; -import mineplex.game.clans.clans.siege.cannon.Cannon; +import mineplex.game.clans.clans.siege.weapon.Cannon; import mineplex.game.clans.clans.siege.weapon.SiegeWeapon; import mineplex.game.clans.core.repository.ClanTerritory; import net.minecraft.server.v1_8_R3.AxisAlignedBB; diff --git a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/siege/weapon/AccessType.java b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/siege/weapon/AccessType.java deleted file mode 100644 index aafb8c9d4..000000000 --- a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/siege/weapon/AccessType.java +++ /dev/null @@ -1,7 +0,0 @@ -package mineplex.game.clans.clans.siege.weapon; - -public enum AccessType -{ - RCLICK_BB, - LCLICK_BB, -} diff --git a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/siege/cannon/Cannon.java b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/siege/weapon/Cannon.java similarity index 91% rename from Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/siege/cannon/Cannon.java rename to Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/siege/weapon/Cannon.java index aa05e1f16..4b55a9df5 100644 --- a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/siege/cannon/Cannon.java +++ b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/siege/weapon/Cannon.java @@ -1,4 +1,4 @@ -package mineplex.game.clans.clans.siege.cannon; +package mineplex.game.clans.clans.siege.weapon; import org.bukkit.Location; import org.bukkit.Material; @@ -22,12 +22,11 @@ import mineplex.core.common.util.UtilServer; import mineplex.core.common.util.UtilTime; import mineplex.core.itemstack.ItemBuilder; import mineplex.game.clans.clans.ClanInfo; -import mineplex.game.clans.clans.siege.weapon.AccessRule; -import mineplex.game.clans.clans.siege.weapon.AccessType; -import mineplex.game.clans.clans.siege.weapon.ProjectileAttributes; -import mineplex.game.clans.clans.siege.weapon.SiegeWeapon; -import mineplex.game.clans.clans.siege.weapon.WeaponProjectile; -import mineplex.game.clans.clans.siege.weapon.WeaponStateInfo; +import mineplex.game.clans.clans.siege.weapon.projectile.ProjectileAttributes; +import mineplex.game.clans.clans.siege.weapon.projectile.WeaponProjectile; +import mineplex.game.clans.clans.siege.weapon.util.AccessRule; +import mineplex.game.clans.clans.siege.weapon.util.AccessType; +import mineplex.game.clans.clans.siege.weapon.util.WeaponStateInfo; public class Cannon extends SiegeWeapon { @@ -101,8 +100,6 @@ public class Cannon extends SiegeWeapon return !player.equals(getRider()); })); - - System.out.println("Cannon initialized."); } private void loadEntities() diff --git a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/siege/catapult/Catapult.java b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/siege/weapon/Catapult.java similarity index 89% rename from Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/siege/catapult/Catapult.java rename to Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/siege/weapon/Catapult.java index 73f2c5b3a..2212608c5 100644 --- a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/siege/catapult/Catapult.java +++ b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/siege/weapon/Catapult.java @@ -1,4 +1,4 @@ -package mineplex.game.clans.clans.siege.catapult; +package mineplex.game.clans.clans.siege.weapon; import org.bukkit.Location; import org.bukkit.Material; @@ -22,12 +22,11 @@ import mineplex.core.common.util.UtilServer; import mineplex.core.common.util.UtilTime; import mineplex.core.itemstack.ItemBuilder; import mineplex.game.clans.clans.ClanInfo; -import mineplex.game.clans.clans.siege.weapon.AccessRule; -import mineplex.game.clans.clans.siege.weapon.AccessType; -import mineplex.game.clans.clans.siege.weapon.ProjectileAttributes; -import mineplex.game.clans.clans.siege.weapon.SiegeWeapon; -import mineplex.game.clans.clans.siege.weapon.WeaponProjectile; -import mineplex.game.clans.clans.siege.weapon.WeaponStateInfo; +import mineplex.game.clans.clans.siege.weapon.projectile.ProjectileAttributes; +import mineplex.game.clans.clans.siege.weapon.projectile.WeaponProjectile; +import mineplex.game.clans.clans.siege.weapon.util.AccessRule; +import mineplex.game.clans.clans.siege.weapon.util.AccessType; +import mineplex.game.clans.clans.siege.weapon.util.WeaponStateInfo; public class Catapult extends SiegeWeapon { @@ -56,7 +55,7 @@ public class Catapult extends SiegeWeapon setAmmunitionSlot(4); setMaximumAmmunitionPerSlot(1); - setProjectileAttributes(new ProjectileAttributes().setPrimedTnt().setDoCrater().craterSize(3).craterChanceOfAir(1.5d)); + setProjectileAttributes(new ProjectileAttributes().setFallingBlock().setFallingBlockType(Material.TNT).setDoCrater().craterSize(3).craterChanceOfAir(1.3d)); setFireRule(new AccessRule(AccessType.LCLICK_BB, player -> { if (!_owner.isMember(player)) @@ -102,8 +101,6 @@ public class Catapult extends SiegeWeapon return !player.equals(getRider()); })); - - System.out.println("Cannon initialized."); } private void loadEntities() @@ -141,6 +138,12 @@ public class Catapult extends SiegeWeapon addEntity(armorStand, "WEAPON"); } + @Override + public float Rotate(float nextYaw) + { + return nextYaw + 180; + } + @Override public void Fire(WeaponProjectile projectile) { diff --git a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/siege/weapon/SiegeWeapon.java b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/siege/weapon/SiegeWeapon.java index bace470f0..ef6e3967b 100644 --- a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/siege/weapon/SiegeWeapon.java +++ b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/siege/weapon/SiegeWeapon.java @@ -37,7 +37,12 @@ import mineplex.core.updater.UpdateType; import mineplex.core.updater.event.UpdateEvent; import mineplex.game.clans.clans.ClanInfo; import mineplex.game.clans.clans.ClansManager; -import mineplex.game.clans.clans.siege.BarrierCollisionBox; +import mineplex.game.clans.clans.siege.weapon.projectile.ProjectileAttributes; +import mineplex.game.clans.clans.siege.weapon.projectile.WeaponProjectile; +import mineplex.game.clans.clans.siege.weapon.util.AccessRule; +import mineplex.game.clans.clans.siege.weapon.util.AccessType; +import mineplex.game.clans.clans.siege.weapon.util.BarrierCollisionBox; +import mineplex.game.clans.clans.siege.weapon.util.WeaponStateInfo; public abstract class SiegeWeapon implements Listener { @@ -83,12 +88,13 @@ public abstract class SiegeWeapon implements Listener private ProjectileAttributes _projectileAttributes; private WeaponProjectile _projectile; + private long _lastRight = -1; + private long _lastLeft = -1; + protected long _lastFired; public SiegeWeapon(Location location, double maxHealth, String name, ClanInfo owner, ClansManager clansManager) { - System.out.println("Siege Weapon initializing."); - _location = location; _name = name; _health = _maxHealth = maxHealth; @@ -106,6 +112,11 @@ public abstract class SiegeWeapon implements Listener _clans = clansManager; } + public ClansManager getClans() + { + return _clans; + } + protected void damage(Player player) { @@ -169,7 +180,7 @@ public abstract class SiegeWeapon implements Listener if (dif > 180) dif -= 360; if (dif < -180) dif += 360; - double yaw = standYaw + Math.min(dif / 20.f, 4f); + double yaw = Rotate((float) ((float)standYaw + Math.min(dif / 20.f, 4f))); armorStand.setHeadPose(new EulerAngle(0, Math.toRadians(yaw), 0)); } @@ -179,9 +190,6 @@ public abstract class SiegeWeapon implements Listener protected boolean canBeFired() { - - System.out.println(getPowerLevel()); - System.out.println(getAmmunition()); return getPowerLevel() > 0 && getAmmunition() > 0 && _projectile == null; } @@ -192,7 +200,6 @@ public abstract class SiegeWeapon implements Listener private void fire(Player player) { - System.out.println("Firing siege weapon..."); _lastFired = System.currentTimeMillis(); double[] vel = getProjectileVelocity(); @@ -270,8 +277,6 @@ public abstract class SiegeWeapon implements Listener power += _inventory.getItem(slot).getAmount(); } - System.out.println("Power: " + power); - return power / 4; } @@ -320,7 +325,6 @@ public abstract class SiegeWeapon implements Listener private void handleMount(Player player) { - System.out.println("handling mount"); getEntity("PLAYERMOUNT").setPassenger(player); OnMount(player); } @@ -332,9 +336,21 @@ public abstract class SiegeWeapon implements Listener private void handleRightClick(Player player) { - RightClick(player); + if (_lastRight == -1) + { + _lastRight = System.currentTimeMillis(); + } + else + { + if (System.currentTimeMillis() - _lastRight <= 40) + { + return; + } + } - System.out.println("handling right click"); + _lastRight = System.currentTimeMillis(); + + RightClick(player); if (_isRideable && _mountAccess.allow(AccessType.RCLICK_BB, player)) { @@ -356,6 +372,20 @@ public abstract class SiegeWeapon implements Listener private void handleLeftClick(Player player) { + if (_lastLeft == -1) + { + _lastLeft = System.currentTimeMillis(); + } + else + { + if (System.currentTimeMillis() - _lastLeft <= 40) + { + return; + } + } + + _lastLeft = System.currentTimeMillis(); + LeftClick(player); if (_isRideable && _mountAccess.allow(AccessType.LCLICK_BB, player)) @@ -412,6 +442,11 @@ public abstract class SiegeWeapon implements Listener { } + protected float Rotate(float yaw) + { + return yaw; + } + // Entity Management protected final void addEntity(Entity entity, String uniqueName) @@ -466,8 +501,6 @@ public abstract class SiegeWeapon implements Listener { Validate.isTrue(_registeredStates.containsKey(state), "Provided state has not yet been registered."); - System.out.println("Updating siege weapon state"); - ((ArmorStand) getEntity("WEAPON")).setHelmet(new ItemStack(_registeredStates.get(state).getType(), 1, (short) 0, (byte) _registeredStates.get(state).getData())); _currentState = state; @@ -527,14 +560,14 @@ public abstract class SiegeWeapon implements Listener { if (getRider() != null) { - getRider().getInventory().addItem(new ItemStack(Material.TNT, item.getAmount() - _maxAmmunition)); + getRider().getInventory().addItem(new ItemStack(_ammunitionType, item.getAmount() - _maxAmmunition)); } else { _location.getWorld().dropItem(_location, item); } - _inventory.setItem(slot, new ItemStack(Material.TNT, _maxAmmunition)); + _inventory.setItem(slot, new ItemStack(_ammunitionType, _maxAmmunition)); } } } diff --git a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/siege/weapon/Crater.java b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/siege/weapon/projectile/Crater.java similarity index 95% rename from Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/siege/weapon/Crater.java rename to Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/siege/weapon/projectile/Crater.java index acb732940..d1c2bd242 100644 --- a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/siege/weapon/Crater.java +++ b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/siege/weapon/projectile/Crater.java @@ -1,4 +1,4 @@ -package mineplex.game.clans.clans.siege.weapon; +package mineplex.game.clans.clans.siege.weapon.projectile; import java.util.ArrayList; import java.util.HashMap; @@ -23,6 +23,7 @@ import mineplex.core.common.util.UtilParticle.ViewDist; import mineplex.core.common.util.UtilServer; import mineplex.core.updater.UpdateType; import mineplex.core.updater.event.UpdateEvent; +import mineplex.game.clans.clans.siege.weapon.SiegeWeapon; public class Crater implements Listener { @@ -52,7 +53,7 @@ public class Crater implements Listener _airChance = airChance; _fire = doFire; - UtilServer.getPluginManager().registerEvents(this, _weapon._clans.getPlugin()); + UtilServer.getPluginManager().registerEvents(this, _weapon.getClans().getPlugin()); createExplosion(); } diff --git a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/siege/weapon/CraterBlock.java b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/siege/weapon/projectile/CraterBlock.java similarity index 90% rename from Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/siege/weapon/CraterBlock.java rename to Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/siege/weapon/projectile/CraterBlock.java index e770cfb58..e8ff4058b 100644 --- a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/siege/weapon/CraterBlock.java +++ b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/siege/weapon/projectile/CraterBlock.java @@ -1,4 +1,4 @@ -package mineplex.game.clans.clans.siege.weapon; +package mineplex.game.clans.clans.siege.weapon.projectile; import org.bukkit.Location; import org.bukkit.Material; diff --git a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/siege/weapon/ProjectileAttributes.java b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/siege/weapon/projectile/ProjectileAttributes.java similarity index 95% rename from Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/siege/weapon/ProjectileAttributes.java rename to Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/siege/weapon/projectile/ProjectileAttributes.java index 7b5e94013..bbb6ffa7c 100644 --- a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/siege/weapon/ProjectileAttributes.java +++ b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/siege/weapon/projectile/ProjectileAttributes.java @@ -1,4 +1,4 @@ -package mineplex.game.clans.clans.siege.weapon; +package mineplex.game.clans.clans.siege.weapon.projectile; import org.bukkit.Material; diff --git a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/siege/weapon/ProjectileType.java b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/siege/weapon/projectile/ProjectileType.java similarity index 50% rename from Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/siege/weapon/ProjectileType.java rename to Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/siege/weapon/projectile/ProjectileType.java index 0f364ee89..018255e8f 100644 --- a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/siege/weapon/ProjectileType.java +++ b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/siege/weapon/projectile/ProjectileType.java @@ -1,4 +1,4 @@ -package mineplex.game.clans.clans.siege.weapon; +package mineplex.game.clans.clans.siege.weapon.projectile; public enum ProjectileType { diff --git a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/siege/weapon/WeaponProjectile.java b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/siege/weapon/projectile/WeaponProjectile.java similarity index 93% rename from Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/siege/weapon/WeaponProjectile.java rename to Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/siege/weapon/projectile/WeaponProjectile.java index b2d527368..70fb2b4f2 100644 --- a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/siege/weapon/WeaponProjectile.java +++ b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/siege/weapon/projectile/WeaponProjectile.java @@ -1,4 +1,4 @@ -package mineplex.game.clans.clans.siege.weapon; +package mineplex.game.clans.clans.siege.weapon.projectile; import org.bukkit.Location; import org.bukkit.Sound; @@ -19,6 +19,7 @@ import mineplex.core.common.util.UtilItem; import mineplex.core.common.util.UtilServer; import mineplex.core.updater.UpdateType; import mineplex.core.updater.event.UpdateEvent; +import mineplex.game.clans.clans.siege.weapon.SiegeWeapon; public class WeaponProjectile implements Listener { @@ -43,11 +44,9 @@ public class WeaponProjectile implements Listener _yVel = yVel; _xMulti = xMulti; - UtilServer.getPluginManager().registerEvents(this, weapon._clans.getPlugin()); + UtilServer.getPluginManager().registerEvents(this, weapon.getClans().getPlugin()); spawn(); - - System.out.println("New Projectile"); } @EventHandler(priority = EventPriority.HIGHEST) @@ -168,9 +167,5 @@ public class WeaponProjectile implements Listener tnt.setVelocity(velocity); } - else - { - System.out.println("==== SIEGE WEAPON PROJECTILE ATTRIBUTES DOES NOT SPECIFY ENTITY TYPE ===="); - } } } diff --git a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/siege/weapon/AccessRule.java b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/siege/weapon/util/AccessRule.java similarity index 87% rename from Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/siege/weapon/AccessRule.java rename to Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/siege/weapon/util/AccessRule.java index f740f6665..b1eb7b37d 100644 --- a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/siege/weapon/AccessRule.java +++ b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/siege/weapon/util/AccessRule.java @@ -1,4 +1,4 @@ -package mineplex.game.clans.clans.siege.weapon; +package mineplex.game.clans.clans.siege.weapon.util; import java.util.function.Predicate; diff --git a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/siege/weapon/util/AccessType.java b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/siege/weapon/util/AccessType.java new file mode 100644 index 000000000..6fccb310d --- /dev/null +++ b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/siege/weapon/util/AccessType.java @@ -0,0 +1,7 @@ +package mineplex.game.clans.clans.siege.weapon.util; + +public enum AccessType +{ + RCLICK_BB, + LCLICK_BB, +} diff --git a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/siege/BarrierCollisionBox.java b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/siege/weapon/util/BarrierCollisionBox.java similarity index 98% rename from Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/siege/BarrierCollisionBox.java rename to Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/siege/weapon/util/BarrierCollisionBox.java index 82343e0f2..3d5dcb0cf 100644 --- a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/siege/BarrierCollisionBox.java +++ b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/siege/weapon/util/BarrierCollisionBox.java @@ -1,4 +1,4 @@ -package mineplex.game.clans.clans.siege; +package mineplex.game.clans.clans.siege.weapon.util; import java.util.ArrayList; import java.util.Arrays; @@ -123,8 +123,6 @@ public class BarrierCollisionBox implements Listener { for (Location other : _collisionBlocks) { - System.out.println(other + " : " + location); - if (other.equals(location)) { return true; diff --git a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/siege/weapon/WeaponStateInfo.java b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/siege/weapon/util/WeaponStateInfo.java similarity index 85% rename from Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/siege/weapon/WeaponStateInfo.java rename to Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/siege/weapon/util/WeaponStateInfo.java index 917035f38..b0eae35e7 100644 --- a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/siege/weapon/WeaponStateInfo.java +++ b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/siege/weapon/util/WeaponStateInfo.java @@ -1,4 +1,4 @@ -package mineplex.game.clans.clans.siege.weapon; +package mineplex.game.clans.clans.siege.weapon.util; import org.bukkit.Material;