mirror of
https://github.com/EngineHub/WorldGuard.git
synced 2024-12-18 15:17:36 +01:00
Handle TNT Minecarts with tnt flag/settings.
This commit is contained in:
parent
f07acea3e1
commit
89430c13ec
2
pom.xml
2
pom.xml
@ -46,7 +46,7 @@
|
||||
<dependency>
|
||||
<groupId>org.bukkit</groupId>
|
||||
<artifactId>bukkit</artifactId>
|
||||
<version>1.4.7-R1.0</version>
|
||||
<version>1.5-R0.1-SNAPSHOT</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
|
@ -35,6 +35,8 @@
|
||||
import org.bukkit.entity.EntityType;
|
||||
import org.bukkit.entity.Fireball;
|
||||
import org.bukkit.entity.LivingEntity;
|
||||
import org.bukkit.entity.Minecart;
|
||||
import org.bukkit.entity.MinecartTNT;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.entity.Projectile;
|
||||
import org.bukkit.entity.TNTPrimed;
|
||||
@ -272,7 +274,7 @@ private void onEntityDamageByEntity(EntityDamageByEntityEvent event) {
|
||||
}
|
||||
}
|
||||
|
||||
if (attacker instanceof TNTPrimed) {
|
||||
if (attacker instanceof TNTPrimed || attacker instanceof MinecartTNT) {
|
||||
|
||||
// The check for explosion damage should be handled already... But... What ever...
|
||||
if (wcfg.blockTNTExplosions) {
|
||||
@ -598,7 +600,7 @@ public void onEntityExplode(EntityExplodeEvent event) {
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if (ent instanceof TNTPrimed) {
|
||||
} else if (ent instanceof TNTPrimed || ent instanceof MinecartTNT) {
|
||||
if (wcfg.blockTNTBlockDamage) {
|
||||
event.blockList().clear();
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user