mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-16 12:43:52 -07:00
fixed buttons, plates
added yield to explosion added event for chunk unloading
This commit is contained in:
@@ -4,7 +4,8 @@ import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
// CraftBukkit start
|
||||
import org.bukkit.block.BlockFace;import org.bukkit.craftbukkit.CraftServer;
|
||||
import org.bukkit.block.BlockFace;
|
||||
import org.bukkit.craftbukkit.CraftServer;
|
||||
import org.bukkit.craftbukkit.CraftWorld;
|
||||
import org.bukkit.craftbukkit.block.CraftBlock;
|
||||
import org.bukkit.craftbukkit.entity.CraftLivingEntity;
|
||||
@@ -115,6 +116,15 @@ public class BlockPressurePlate extends Block {
|
||||
flag1 = true;
|
||||
}
|
||||
|
||||
// Craftbukkit start
|
||||
CraftWorld craftWorld = ((WorldServer) world).getWorld();
|
||||
CraftServer server = ((WorldServer) world).getServer();
|
||||
CraftBlock block = (CraftBlock) craftWorld.getBlockAt(i, j, k);
|
||||
BlockRedstoneEvent eventRedstone = new BlockRedstoneEvent(block, flag ? 1 : 0, flag1 ? 1 : 0);
|
||||
server.getPluginManager().callEvent(eventRedstone);
|
||||
flag1 = eventRedstone.getNewCurrent() > 0;
|
||||
// Craftbukkit end
|
||||
|
||||
if (flag1 && !flag) {
|
||||
world.c(i, j, k, 1);
|
||||
world.h(i, j, k, this.id);
|
||||
|
Reference in New Issue
Block a user