mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-30 04:02:50 +01:00
Change block ignite in flint and steel to be seperate from item use
This commit is contained in:
parent
abb3c5eee6
commit
bdd3c4dabe
1 changed files with 13 additions and 8 deletions
|
@ -59,15 +59,20 @@ public class ItemFlintAndSteel extends Item {
|
||||||
server.getPluginManager().callEvent(pie);
|
server.getPluginManager().callEvent(pie);
|
||||||
|
|
||||||
boolean preventLighter = pie.isCancelled();
|
boolean preventLighter = pie.isCancelled();
|
||||||
boolean preventFire = false;
|
|
||||||
if (blockClicked.getTypeId() != Block.ar.bi){
|
|
||||||
IgniteCause igniteCause = BlockIgniteEvent.IgniteCause.FLINT_AND_STEEL;
|
IgniteCause igniteCause = BlockIgniteEvent.IgniteCause.FLINT_AND_STEEL;
|
||||||
BlockIgniteEvent bie = new BlockIgniteEvent(blockClicked, igniteCause, thePlayer);
|
BlockIgniteEvent bie = new BlockIgniteEvent(blockClicked, igniteCause, thePlayer);
|
||||||
server.getPluginManager().callEvent(bie);
|
server.getPluginManager().callEvent(bie);
|
||||||
preventFire = bie.isCancelled();
|
boolean preventFire = bie.isCancelled();
|
||||||
|
|
||||||
|
|
||||||
|
if (preventLighter) {
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (preventLighter || preventFire) {
|
if (preventFire) {
|
||||||
|
itemstack.b(1);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
|
|
Loading…
Reference in a new issue