removed dead code
This commit is contained in:
parent
b9cef8f567
commit
a82945909d
@ -39,43 +39,5 @@ public class PlacePixelBlockListener implements Listener {
|
|||||||
newBlockLocation,
|
newBlockLocation,
|
||||||
direction
|
direction
|
||||||
);
|
);
|
||||||
// if(!info.hasOwner()) {
|
|
||||||
// pixelBlock = PixelBlock.createPixelBlock(
|
|
||||||
// UUID.randomUUID(),
|
|
||||||
// event.getPlayer().getUniqueId(),
|
|
||||||
// newBlockLocation,
|
|
||||||
// Direction.south
|
|
||||||
// );
|
|
||||||
//// pixelBlock = new PixelBlock(
|
|
||||||
//// newBlockLocation,
|
|
||||||
//// event.getPlayer().getUniqueId(),
|
|
||||||
//// UUID.randomUUID(),
|
|
||||||
//// direction
|
|
||||||
//// );
|
|
||||||
// } else {
|
|
||||||
// UUID itemUUID = info.id();
|
|
||||||
// pixelBlock = PixelBlock.createPixelBlock(
|
|
||||||
// UUID.randomUUID(),
|
|
||||||
// even.getUniqueId(),
|
|
||||||
// playerLocation.toBlockLocation(),
|
|
||||||
// Direction.south
|
|
||||||
// );
|
|
||||||
//// pixelBlock = Main.pixelBlocks.stream()
|
|
||||||
//// .filter(block -> block.getBlockUUID().equals(itemUUID))
|
|
||||||
//// .findFirst()
|
|
||||||
//// .orElseGet(() -> new PixelBlock(
|
|
||||||
//// newBlockLocation,
|
|
||||||
//// event.getPlayer().getUniqueId(),
|
|
||||||
//// itemUUID,
|
|
||||||
//// direction
|
|
||||||
//// ));
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// try {
|
|
||||||
// pixelBlock.place(newBlockLocation, direction);
|
|
||||||
// } catch (IllegalArgumentException e) {
|
|
||||||
// event.setCancelled(true);
|
|
||||||
// event.getPlayer().sendMessage(Component.text(e.getMessage()));
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -178,23 +178,6 @@ public class PixelBlock {
|
|||||||
.execute();
|
.execute();
|
||||||
}
|
}
|
||||||
|
|
||||||
// public void place(Location placeLocation, Direction direction) {
|
|
||||||
// Location newLocation = placeLocation.toBlockLocation();
|
|
||||||
// newLocation.setPitch(0);
|
|
||||||
// newLocation.setYaw(0);
|
|
||||||
//
|
|
||||||
// @Nullable PixelBlock blockAtLocation = PixelBlock.getPixelBlockFromPlacedLocation(newLocation);
|
|
||||||
// if(blockAtLocation != null && blockAtLocation != this) throw new IllegalArgumentException("Es können nicht mehrere Pixelblöcke ineinander platziert werden.");
|
|
||||||
//
|
|
||||||
// Main.logger().info(String.format("Placing PixelBlock '%s' at %s", this.blockUUID, placeLocation));
|
|
||||||
// this.pixelBlockLocation = newLocation;
|
|
||||||
// this.facingDirection = direction;
|
|
||||||
// updateEntities();
|
|
||||||
// Main.database.savePixelBlock(this);
|
|
||||||
//
|
|
||||||
// this.placeholder = PixelBlockPlaceholder.newPlaceholder(this);
|
|
||||||
// }
|
|
||||||
|
|
||||||
public void destroy(Player destroyedBy) {
|
public void destroy(Player destroyedBy) {
|
||||||
if(!this.isAccessible) return;
|
if(!this.isAccessible) return;
|
||||||
if(Main.configuration().onlyBreakableByOwner() && !destroyedBy.getUniqueId().equals(ownerUUID)) {
|
if(Main.configuration().onlyBreakableByOwner() && !destroyedBy.getUniqueId().equals(ownerUUID)) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user