use of gg.projecteden.nexus.features.events.y2020.halloween20.models.ComboLockNumber in project Nexus by ProjectEdenGG.
the class Halloween20 method onInteract.
// ComboLock Handler
@EventHandler
public void onInteract(PlayerInteractEvent event) {
if (!Utils.ActionGroup.CLICK_BLOCK.applies(event))
return;
if (!worldguard().getPlayersInRegion(region).contains(event.getPlayer()))
return;
if (event.getHand() != EquipmentSlot.HAND)
return;
ComboLockNumber number = ComboLockNumber.getByLocation(event.getClickedBlock().getLocation());
if (number == null)
return;
event.setCancelled(true);
Tasks.wait(1, () -> number.onFind(event.getPlayer()));
}
Aggregations