mirror of
https://github.com/EngineHub/WorldGuard.git
synced 2024-12-19 23:57:43 +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>
|
<dependency>
|
||||||
<groupId>org.bukkit</groupId>
|
<groupId>org.bukkit</groupId>
|
||||||
<artifactId>bukkit</artifactId>
|
<artifactId>bukkit</artifactId>
|
||||||
<version>1.4.7-R1.0</version>
|
<version>1.5-R0.1-SNAPSHOT</version>
|
||||||
<scope>compile</scope>
|
<scope>compile</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
|
@ -35,6 +35,8 @@
|
|||||||
import org.bukkit.entity.EntityType;
|
import org.bukkit.entity.EntityType;
|
||||||
import org.bukkit.entity.Fireball;
|
import org.bukkit.entity.Fireball;
|
||||||
import org.bukkit.entity.LivingEntity;
|
import org.bukkit.entity.LivingEntity;
|
||||||
|
import org.bukkit.entity.Minecart;
|
||||||
|
import org.bukkit.entity.MinecartTNT;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.entity.Projectile;
|
import org.bukkit.entity.Projectile;
|
||||||
import org.bukkit.entity.TNTPrimed;
|
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...
|
// The check for explosion damage should be handled already... But... What ever...
|
||||||
if (wcfg.blockTNTExplosions) {
|
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) {
|
if (wcfg.blockTNTBlockDamage) {
|
||||||
event.blockList().clear();
|
event.blockList().clear();
|
||||||
return;
|
return;
|
||||||
|
Loading…
Reference in New Issue
Block a user