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