Do not show condition status when selecting block

This commit is contained in:
PikaMug 2020-08-23 20:19:03 -04:00
parent e3242e2600
commit de16f28c81
2 changed files with 18 additions and 0 deletions

View File

@ -4177,4 +4177,19 @@ public class Quester {
}
return true;
}
public boolean isSelectingBlock() {
final UUID uuid = getPlayer().getUniqueId();
if (plugin.getQuestFactory().getSelectedBlockStarts().containsKey(uuid)
|| plugin.getQuestFactory().getSelectedKillLocations().containsKey(uuid)
|| plugin.getQuestFactory().getSelectedReachLocations().containsKey(uuid)
|| plugin.getActionFactory().getSelectedExplosionLocations().containsKey(uuid)
|| plugin.getActionFactory().getSelectedEffectLocations().containsKey(uuid)
|| plugin.getActionFactory().getSelectedMobLocations().containsKey(uuid)
|| plugin.getActionFactory().getSelectedLightningLocations().containsKey(uuid)
|| plugin.getActionFactory().getSelectedTeleportLocations().containsKey(uuid)) {
return true;
}
return false;
}
}

View File

@ -169,6 +169,9 @@ public class BlockListener implements Listener {
final Player player = evt.getPlayer();
if (plugin.canUseQuests(evt.getPlayer().getUniqueId())) {
final Quester quester = plugin.getQuester(player.getUniqueId());
if (quester.isSelectingBlock()) {
return;
}
if (evt.getAction().equals(Action.RIGHT_CLICK_BLOCK)) {
if (evt.isCancelled() == false) {
final ItemStack blockItemStack = new ItemStack(evt.getClickedBlock().getType(), 1, evt