mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-07-16 04:24:43 +02:00
Made fire stopping simpler and functional.
This commit is contained in:
@ -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;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user