Add option to fix physics event - PaperMC/Paper#1867

This commit is contained in:
Sotr
2019-03-07 13:06:55 +08:00
parent 6f25bb7ea4
commit e8a47919ce
3 changed files with 28 additions and 1 deletions

View File

@@ -519,7 +519,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc
// CraftBukkit start
iblockdata1.b(this, blockposition, j); // Don't call an event for the old block to limit event spam
CraftWorld world = ((WorldServer) this).getWorld();
if (world != null && ((WorldServer)this).hasPhysicsEvent) { // Paper
if (world != null && ((WorldServer)this).hasPhysicsEvent && !io.akarin.server.core.AkarinGlobalConfig.fixPhysicsEventBehaviour) { // Paper // Akarin - fixes physics event
BlockPhysicsEvent event = new BlockPhysicsEvent(world.getBlockAt(blockposition.getX(), blockposition.getY(), blockposition.getZ()), CraftBlockData.fromData(iblockdata));
this.getServer().getPluginManager().callEvent(event);