Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-12-19 04:50:06 +01:00
Call ignite event for fireball shot from dispenser.
Dieser Commit ist enthalten in:
Ursprung
d8199aaa39
Commit
e385ffaefc
@ -1,6 +1,9 @@
|
|||||||
package net.minecraft.server;
|
package net.minecraft.server;
|
||||||
|
|
||||||
import org.bukkit.event.entity.EntityCombustByEntityEvent; // CraftBukkit
|
// CraftBukkit start
|
||||||
|
import org.bukkit.event.block.BlockIgniteEvent;
|
||||||
|
import org.bukkit.event.entity.EntityCombustByEntityEvent;
|
||||||
|
// CraftBukkit end
|
||||||
|
|
||||||
public class EntitySmallFireball extends EntityFireball {
|
public class EntitySmallFireball extends EntityFireball {
|
||||||
|
|
||||||
@ -63,8 +66,16 @@ public class EntitySmallFireball extends EntityFireball {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (this.world.isEmpty(i, j, k)) {
|
if (this.world.isEmpty(i, j, k)) {
|
||||||
|
// CraftBukkit start
|
||||||
|
org.bukkit.block.Block block = world.getWorld().getBlockAt(i, j, k);
|
||||||
|
BlockIgniteEvent event = new BlockIgniteEvent(block, BlockIgniteEvent.IgniteCause.FIREBALL, null);
|
||||||
|
world.getServer().getPluginManager().callEvent(event);
|
||||||
|
|
||||||
|
if (!event.isCancelled()) {
|
||||||
this.world.setTypeId(i, j, k, Block.FIRE.id);
|
this.world.setTypeId(i, j, k, Block.FIRE.id);
|
||||||
}
|
}
|
||||||
|
// CraftBukkit end
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this.die();
|
this.die();
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren