Antigriefs should be working now, it will check the sorrounding blocks to see if any of them are blocks that fire is not allowed to spread to. Also commented out if statement on announcements to see if it was bugged or not. Added in /colors command so players can see all the colors they can use.

This commit is contained in:
nossr50
2010-12-07 23:57:32 -08:00
parent 8f09d9c428
commit a2027ec991
4 changed files with 33 additions and 10 deletions

View File

@ -1,5 +1,6 @@
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
@ -93,7 +94,17 @@ public class vMinecraftListener extends PluginListener {
public boolean onIgnite(Block block, Player player) {
if(vMinecraftSettings.stopFire){
if (vMinecraftSettings.fireNoSpread.contains(block)){
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))) {
return true;
}
}