Made fire stopping simpler and functional.

This commit is contained in:
nossr50
2010-12-08 00:21:01 -08:00
parent a2027ec991
commit 891b7d0f43
2 changed files with 4 additions and 17 deletions

View File

@ -1,6 +1,5 @@
import java.util.logging.Level;
import java.util.logging.Logger;
import java.util.Set;
//=====================================================================
//Class: vMinecraftListener
//Use: The listener to catch incoming chat and commands
@ -94,17 +93,10 @@ public class vMinecraftListener extends PluginListener {
public boolean onIgnite(Block block, Player player) {
if(vMinecraftSettings.stopFire){
int x = block.getX();
int y = block.getY();
int z = block.getZ();
if (vMinecraftSettings.fireNoSpread.contains(etc.getServer().getBlockIdAt(x + 1, y, z))
|| vMinecraftSettings.fireNoSpread.contains(etc.getServer().getBlockIdAt(x - 1, y, z))
|| vMinecraftSettings.fireNoSpread.contains(etc.getServer().getBlockIdAt(x, y + 1, z))
|| vMinecraftSettings.fireNoSpread.contains(etc.getServer().getBlockIdAt(x, y - 1, z))
|| vMinecraftSettings.fireNoSpread.contains(etc.getServer().getBlockIdAt(x, y, z + 1))
|| vMinecraftSettings.fireNoSpread.contains(etc.getServer().getBlockIdAt(x, y, z - 1))
|| vMinecraftSettings.fireNoSpread.contains(etc.getServer().getBlockIdAt(x + 1, y + 1, z + 1))
|| vMinecraftSettings.fireNoSpread.contains(etc.getServer().getBlockIdAt(x - 1, y - 1, z - 1))) {
if(block.getStatus() == 3 || block.getStatus() == 1){
return true;
}
if(block.getStatus() == 2 && !player.isAdmin()){
return true;
}
}