mirror of
https://github.com/PikaMug/Quests.git
synced 2024-11-23 02:55:40 +01:00
Do not show condition status when selecting block
This commit is contained in:
parent
e3242e2600
commit
de16f28c81
@ -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;
|
||||
}
|
||||
}
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user