3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-12-18 12:30:06 +01:00

Change block ignite in flint and steel to be seperate from item use

Dieser Commit ist enthalten in:
speakeasy 2011-01-19 08:59:22 +08:00 committet von Warren
Ursprung abb3c5eee6
Commit bdd3c4dabe

Datei anzeigen

@ -59,15 +59,20 @@ public class ItemFlintAndSteel extends Item {
server.getPluginManager().callEvent(pie);
boolean preventLighter = pie.isCancelled();
boolean preventFire = false;
if (blockClicked.getTypeId() != Block.ar.bi){
IgniteCause igniteCause = BlockIgniteEvent.IgniteCause.FLINT_AND_STEEL;
BlockIgniteEvent bie = new BlockIgniteEvent(blockClicked, igniteCause, thePlayer);
server.getPluginManager().callEvent(bie);
preventFire = bie.isCancelled();
}
IgniteCause igniteCause = BlockIgniteEvent.IgniteCause.FLINT_AND_STEEL;
BlockIgniteEvent bie = new BlockIgniteEvent(blockClicked, igniteCause, thePlayer);
server.getPluginManager().callEvent(bie);
boolean preventFire = bie.isCancelled();
if (preventLighter || preventFire) {
if (preventLighter) {
return false;
}
if (preventFire) {
itemstack.b(1);
return false;
}
// CraftBukkit end