Minor changes, whatever

This commit is contained in:
Georgiy 2013-06-30 21:00:43 -04:00
parent 9c44f3daec
commit 84d77f2f25
2 changed files with 149 additions and 148 deletions

View File

@ -133,6 +133,6 @@ public class DiscoParty {
updater.cancel(); updater.cancel();
} }
updater = null; updater = null;
ds.getParties().remove(this.player.getName()); ds.getPartyMap().remove(this.player.getName());
} }
} }

View File

@ -24,9 +24,9 @@ public class SheepDeshearer implements Listener {
@EventHandler @EventHandler
public void onPlayerShear(PlayerShearEntityEvent e) { public void onPlayerShear(PlayerShearEntityEvent e) {
if (e.getEntity() instanceof Sheep){ if (e.getEntity() instanceof Sheep) {
for(DiscoParty party : parent.getParties()){ for (DiscoParty party : parent.getParties()) {
if(party.getSheep().contains((Sheep)e.getEntity())){ if (party.getSheep().contains((Sheep) e.getEntity())) {
e.setCancelled(true); e.setCancelled(true);
} }
} }
@ -34,10 +34,11 @@ public class SheepDeshearer implements Listener {
} }
@EventHandler @EventHandler
public void onCreatureSpawn(CreatureSpawnEvent e){ public void onCreatureSpawn(CreatureSpawnEvent e) {
if(e.getEntity() instanceof Sheep && e.getSpawnReason().equals(CreatureSpawnEvent.SpawnReason.BREEDING)){ if (e.getEntity() instanceof Sheep &&
for(DiscoParty party : parent.getParties()){ e.getSpawnReason().equals(CreatureSpawnEvent.SpawnReason.BREEDING)) {
if(party.getSheep().contains((Sheep)e.getEntity())){ for (DiscoParty party : parent.getParties()) {
if (party.getSheep().contains((Sheep) e.getEntity())) {
e.setCancelled(true); e.setCancelled(true);
} }
} }