Retire 'chunkloaded' trigger, add warning for 'playermove' trigger

This commit is contained in:
Mike Primm 2012-02-07 10:21:56 -06:00
parent dd0f0c7128
commit 8f9006e594
2 changed files with 3 additions and 19 deletions

View File

@ -41,7 +41,6 @@ import org.bukkit.event.player.PlayerJoinEvent;
import org.bukkit.event.player.PlayerListener; import org.bukkit.event.player.PlayerListener;
import org.bukkit.event.player.PlayerMoveEvent; import org.bukkit.event.player.PlayerMoveEvent;
import org.bukkit.event.player.PlayerQuitEvent; import org.bukkit.event.player.PlayerQuitEvent;
import org.bukkit.event.world.ChunkLoadEvent;
import org.bukkit.event.world.ChunkPopulateEvent; import org.bukkit.event.world.ChunkPopulateEvent;
import org.bukkit.event.world.SpawnChangeEvent; import org.bukkit.event.world.SpawnChangeEvent;
import org.bukkit.event.world.WorldListener; import org.bukkit.event.world.WorldListener;
@ -578,7 +577,6 @@ public class DynmapPlugin extends JavaPlugin implements DynmapAPI {
private boolean onplayerjoin; private boolean onplayerjoin;
private boolean onplayermove; private boolean onplayermove;
private boolean ongeneratechunk; private boolean ongeneratechunk;
private boolean onloadchunk;
private boolean onexplosion; private boolean onexplosion;
private void registerEvents() { private void registerEvents() {
@ -808,9 +806,10 @@ public class DynmapPlugin extends JavaPlugin implements DynmapAPI {
onplayermove = core.isTrigger("playermove"); onplayermove = core.isTrigger("playermove");
bep.registerEvent(Event.Type.PLAYER_JOIN, playerTrigger); bep.registerEvent(Event.Type.PLAYER_JOIN, playerTrigger);
bep.registerEvent(Event.Type.PLAYER_QUIT, playerTrigger); bep.registerEvent(Event.Type.PLAYER_QUIT, playerTrigger);
if(onplayermove) if(onplayermove) {
bep.registerEvent(Event.Type.PLAYER_MOVE, playerTrigger); bep.registerEvent(Event.Type.PLAYER_MOVE, playerTrigger);
Log.warning("playermove trigger enabled - this trigger can cause excessive tile updating: use with caution");
}
/* Register entity event triggers */ /* Register entity event triggers */
EntityListener entityTrigger = new EntityListener() { EntityListener entityTrigger = new EntityListener() {
@Override @Override
@ -847,16 +846,6 @@ public class DynmapPlugin extends JavaPlugin implements DynmapAPI {
/* Register world event triggers */ /* Register world event triggers */
WorldListener worldTrigger = new WorldListener() { WorldListener worldTrigger = new WorldListener() {
@Override
public void onChunkLoad(ChunkLoadEvent event) {
if(DynmapCore.ignore_chunk_loads)
return;
Chunk c = event.getChunk();
/* Touch extreme corners */
int x = c.getX() << 4;
int z = c.getZ() << 4;
mapManager.touchVolume(event.getWorld().getName(), x, 0, z, x+15, 128, z+16, "chunkload");
}
@Override @Override
public void onChunkPopulate(ChunkPopulateEvent event) { public void onChunkPopulate(ChunkPopulateEvent event) {
Chunk c = event.getChunk(); Chunk c = event.getChunk();
@ -885,10 +874,6 @@ public class DynmapPlugin extends JavaPlugin implements DynmapAPI {
if(ongeneratechunk) { if(ongeneratechunk) {
bep.registerEvent(Event.Type.CHUNK_POPULATED, worldTrigger); bep.registerEvent(Event.Type.CHUNK_POPULATED, worldTrigger);
} }
onloadchunk = core.isTrigger("chunkloaded");
if(onloadchunk) {
bep.registerEvent(Event.Type.CHUNK_LOAD, worldTrigger);
}
// To link configuration to real loaded worlds. // To link configuration to real loaded worlds.
bep.registerEvent(Event.Type.WORLD_LOAD, worldTrigger); bep.registerEvent(Event.Type.WORLD_LOAD, worldTrigger);

View File

@ -228,7 +228,6 @@ compass-mode: newnorth
#superslopes-support: true #superslopes-support: true
render-triggers: render-triggers:
#- chunkloaded
#- playermove #- playermove
#- playerjoin #- playerjoin
- blockplaced - blockplaced