fixed double item dropping and fixed exitWorld command

This commit is contained in:
MineTec committed 2024-10-15 20:03:14 +02:00
1 parent c3bf1943a5
commit b8bcb5e580
2 files changed
+2 -1

No files matched your search

@@ -23,7 +23,7 @@ public class ExitWorldCommand implements CommandExecutor {
PixelBlock currentPixelBlock = PixelBlock.getPixelBlockFromBlockWorld(playerWorld);
Objects.requireNonNull(currentPixelBlock);
p.teleport(currentPixelBlock.getLastEntryLocation());
currentPixelBlock.exitBlock(p);
}
return true;
}
@@ -180,6 +180,7 @@ public class PixelBlock {
// }
public void destroy(Player destroyedBy) {
if(!this.exists) return;
if(Main.configuration.onlyBreakableByOwner() && !destroyedBy.getUniqueId().equals(ownerUUID)) {
destroyedBy.sendMessage("Dieser Pixelblock gehört nicht dir!");
return;