mirror of
https://github.com/EssentialsX/Essentials.git
synced 2025-01-03 15:08:18 +01:00
Add protect option for disabling ender crystal explosions (#3210)
Closes #587.
This commit is contained in:
parent
d5ffed09b4
commit
283c088b21
@ -799,6 +799,7 @@ protect:
|
||||
creeper-explosion: false
|
||||
creeper-playerdamage: false
|
||||
creeper-blockdamage: false
|
||||
ender-crystal-explosion: false
|
||||
enderdragon-blockdamage: true
|
||||
enderman-pickup: false
|
||||
villager-death: false
|
||||
|
@ -3,6 +3,7 @@ package com.earth2me.essentials.protect;
|
||||
import com.earth2me.essentials.User;
|
||||
import net.ess3.api.IEssentials;
|
||||
import org.bukkit.entity.Creeper;
|
||||
import org.bukkit.entity.EnderCrystal;
|
||||
import org.bukkit.entity.EnderDragon;
|
||||
import org.bukkit.entity.Entity;
|
||||
import org.bukkit.entity.EntityType;
|
||||
@ -185,6 +186,8 @@ public class EssentialsProtectEntityListener implements Listener {
|
||||
event.setCancelled(true);
|
||||
} else if ((entity instanceof ExplosiveMinecart) && prot.getSettingBool(ProtectConfig.prevent_tntminecart_explosion)) {
|
||||
event.setCancelled(true);
|
||||
} else if (entity instanceof EnderCrystal && prot.getSettingBool(ProtectConfig.prevent_ender_crystal_explosion)) {
|
||||
event.setCancelled(true);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -38,6 +38,7 @@ public enum ProtectConfig {
|
||||
prevent_creeper_explosion("protect.prevent.creeper-explosion", true),
|
||||
prevent_creeper_playerdmg("protect.prevent.creeper-playerdamage", false),
|
||||
prevent_creeper_blockdmg("protect.prevent.creeper-blockdamage", false),
|
||||
prevent_ender_crystal_explosion("protect.prevent.ender-crystal-explosion", false),
|
||||
prevent_enderman_pickup("protect.prevent.enderman-pickup", false),
|
||||
prevent_villager_death("protect.prevent.villager-death", false),
|
||||
prevent_enderdragon_blockdmg("protect.prevent.enderdragon-blockdamage", true),
|
||||
|
Loading…
Reference in New Issue
Block a user