disabled hoppers in pixelblocks

This commit is contained in:
2024-07-18 14:35:09 +02:00
parent 93d5c3c67c
commit 79790dae8d
3 changed files with 12 additions and 3 deletions

View File

@@ -162,14 +162,16 @@ public class PixelBlock {
// return;
// }
Objects.requireNonNull(Bukkit.getWorld(plugin.getDataFolder().getPath() + pathSeparator + this.uuid)).getPlayers().forEach(
World world = Objects.requireNonNull(this.getPixelWorld());
world.getPlayers().forEach(
player1 -> {
player1.sendMessage("Der Pixelblock wurde abgebaut!");
player1.teleport(this.lastEntryLocation);
}
);
world.getEntities().forEach(entity -> entity.teleport(this.lastEntryLocation));
this.remove();
this.pixelBlockLocation.getWorld().playSound(this.pixelBlockLocation, Sound.BLOCK_COPPER_BULB_BREAK, 1.0F, 30);