Update to Minecraft 1.15

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2019-12-11 09:00:00 +11:00
parent 1400103b2f
commit 0e142c7f03
293 changed files with 2875 additions and 2648 deletions

View File

@@ -9,18 +9,18 @@
public class BlockLeaves extends Block {
public static final BlockStateInteger DISTANCE = BlockProperties.ah;
@@ -21,6 +23,14 @@
@@ -20,6 +22,14 @@
@Override
public void c(IBlockData iblockdata, World world, BlockPosition blockposition, Random random) {
public void b(IBlockData iblockdata, WorldServer worldserver, BlockPosition blockposition, Random random) {
if (!(Boolean) iblockdata.get(BlockLeaves.PERSISTENT) && (Integer) iblockdata.get(BlockLeaves.DISTANCE) == 7) {
+ // CraftBukkit start
+ LeavesDecayEvent event = new LeavesDecayEvent(world.getWorld().getBlockAt(blockposition.getX(), blockposition.getY(), blockposition.getZ()));
+ world.getServer().getPluginManager().callEvent(event);
+ LeavesDecayEvent event = new LeavesDecayEvent(worldserver.getWorld().getBlockAt(blockposition.getX(), blockposition.getY(), blockposition.getZ()));
+ worldserver.getServer().getPluginManager().callEvent(event);
+
+ if (event.isCancelled() || world.getType(blockposition).getBlock() != this) {
+ if (event.isCancelled() || worldserver.getType(blockposition).getBlock() != this) {
+ return;
+ }
+ // CraftBukkit end
c(iblockdata, world, blockposition);
world.a(blockposition, false);
c(iblockdata, (World) worldserver, blockposition);
worldserver.a(blockposition, false);
}