Fix static access issues.

This commit is contained in:
gmcferrin 2013-01-01 16:04:53 -05:00
parent 15cdf3bfd6
commit aeaad41c45
4 changed files with 8 additions and 8 deletions

View File

@ -183,8 +183,8 @@ public class EntityListener implements Listener {
entity.setFireTicks(0);
BleedTimer.remove(entity);
Archery.arrowRetrievalCheck(entity);
mcMMO.p.placeStore.removeSpawnedMob(((Entity) entity));
mcMMO.p.placeStore.removeSpawnedPet(((Entity) entity));
mcMMO.placeStore.removeSpawnedMob(((Entity) entity));
mcMMO.placeStore.removeSpawnedPet(((Entity) entity));
}
/**
@ -197,7 +197,7 @@ public class EntityListener implements Listener {
SpawnReason reason = event.getSpawnReason();
if ((reason.equals(SpawnReason.SPAWNER) || reason.equals(SpawnReason.SPAWNER_EGG)) && !Config.getInstance().getExperienceGainsMobspawnersEnabled()) {
mcMMO.p.placeStore.addSpawnedMob(((Entity) event.getEntity()));
mcMMO.placeStore.addSpawnedMob(((Entity) event.getEntity()));
}
}
@ -398,7 +398,7 @@ public class EntityListener implements Listener {
if(player.hasMetadata("NPC")) return; // Check if this player is a Citizens NPC
if (Permissions.getInstance().taming(player) && !mcMMO.p.placeStore.isSpawnedPet((Entity) event.getEntity())) {
if (Permissions.getInstance().taming(player) && !mcMMO.placeStore.isSpawnedPet((Entity) event.getEntity())) {
PlayerProfile profile = Users.getProfile(player);
EntityType type = event.getEntityType();
int xp = 0;

View File

@ -51,6 +51,6 @@ public class WorldListener implements Listener {
@EventHandler
public void onChunkLoad(ChunkLoadEvent event) {
if(event.getChunk().getEntities().length > 0)
mcMMO.p.placeStore.loadChunk(event.getChunk().getX(), event.getChunk().getZ(), event.getWorld());
mcMMO.placeStore.loadChunk(event.getChunk().getX(), event.getChunk().getZ(), event.getWorld());
}
}

View File

@ -67,7 +67,7 @@ public class CallOfTheWildEventHandler {
return;
LivingEntity entity = (LivingEntity) player.getWorld().spawnEntity(player.getLocation(), type);
mcMMO.p.placeStore.addSpawnedPet((Entity) entity);
mcMMO.placeStore.addSpawnedPet((Entity) entity);
((Tameable) entity).setOwner(player);

View File

@ -399,8 +399,8 @@ public class Combat {
baseXP = 20 * configInstance.getPlayerVersusPlayerXP();
}
}
else if (!mcMMO.p.placeStore.isSpawnedMob(((Entity) target))) {
if (target instanceof Animals && !mcMMO.p.placeStore.isSpawnedPet((Entity) target)) {
else if (!mcMMO.placeStore.isSpawnedMob(((Entity) target))) {
if (target instanceof Animals && !mcMMO.placeStore.isSpawnedPet((Entity) target)) {
baseXP = configInstance.getAnimalsXP();
}
else {