Skip to content

Commit

Permalink
just use getter
Browse files Browse the repository at this point in the history
  • Loading branch information
xGinko committed Aug 8, 2024
1 parent bb5fa60 commit 225d715
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
import org.bukkit.event.Listener;
import org.bukkit.event.block.Action;
import org.bukkit.event.player.PlayerInteractEvent;
import org.bukkit.inventory.ItemStack;

import java.time.Duration;
import java.util.UUID;
Expand Down Expand Up @@ -65,8 +64,7 @@ private void onCrystalBreak(PrePlayerAttackEntityEvent event) {
private void onCrystalPlace(PlayerInteractEvent event) {
if (placeDelayMillis <= 0) return;
if (event.getAction() != Action.RIGHT_CLICK_BLOCK) return; // Need to right-click a block to place a crystal
final ItemStack interactItem = event.getItem();
if (interactItem == null || interactItem.getType() != XMaterial.END_CRYSTAL.parseMaterial()) return;
if (event.getItem() == null || event.getItem().getType() != XMaterial.END_CRYSTAL.parseMaterial()) return;

if (placeCooldowns.contains(event.getPlayer().getUniqueId())) {
event.setCancelled(true);
Expand Down

0 comments on commit 225d715

Please sign in to comment.