made it so that cannons don't rely on outposts. this should help with testing them without needing an outpost

This commit is contained in:
NewGarbo 2016-01-16 08:25:30 +00:00
parent 254a2e45e4
commit 40c52ac557
2 changed files with 2 additions and 4 deletions

View File

@ -32,7 +32,6 @@ public class Cannon implements Listener
private Location _location; private Location _location;
private CannonState _state; private CannonState _state;
private Outpost _outpost;
private Player _rider; private Player _rider;
@ -41,9 +40,8 @@ public class Cannon implements Listener
private Slime _filler; private Slime _filler;
private Slime _filler2; private Slime _filler2;
public Cannon(Outpost outpost, Location location) public Cannon(Location location)
{ {
_outpost = outpost;
_location = location; _location = location;
_state = CannonState.UNLOADED; _state = CannonState.UNLOADED;

View File

@ -518,7 +518,7 @@ public class Outpost implements Listener
public void spawnCannon(Player player, Location location) public void spawnCannon(Player player, Location location)
{ {
Cannon cannon = new Cannon(this, location); Cannon cannon = new Cannon(location);
_host.getPlugin().getServer().getPluginManager().registerEvents(cannon, _host.getPlugin()); _host.getPlugin().getServer().getPluginManager().registerEvents(cannon, _host.getPlugin());
_cannons.add(cannon); _cannons.add(cannon);