mirror of
https://github.com/PlayPro/CoreProtect.git
synced 2024-11-24 12:16:36 +01:00
Fixed "coreprotect.inspect" permission not being checked at the time of inspection (fixes #133)
This commit is contained in:
parent
fdb98bd329
commit
b1c2795289
@ -33,6 +33,11 @@ public final class HangingBreakByEntityListener extends Queue implements Listene
|
||||
class BasicThread implements Runnable {
|
||||
@Override
|
||||
public void run() {
|
||||
if (!player.hasPermission("coreprotect.inspect")) {
|
||||
Chat.sendMessage(player, Color.DARK_AQUA + "CoreProtect " + Color.WHITE + "- " + Phrase.build(Phrase.NO_PERMISSION));
|
||||
ConfigHandler.inspecting.put(player.getName(), false);
|
||||
return;
|
||||
}
|
||||
if (ConfigHandler.converterRunning) {
|
||||
Chat.sendMessage(player, Color.DARK_AQUA + "CoreProtect " + Color.WHITE + "- " + Phrase.build(Phrase.UPGRADE_IN_PROGRESS));
|
||||
return;
|
||||
|
@ -53,6 +53,11 @@ public final class ArmorStandManipulateListener extends Queue implements Listene
|
||||
class BasicThread implements Runnable {
|
||||
@Override
|
||||
public void run() {
|
||||
if (!finalPlayer.hasPermission("coreprotect.inspect")) {
|
||||
Chat.sendMessage(finalPlayer, Color.DARK_AQUA + "CoreProtect " + Color.WHITE + "- " + Phrase.build(Phrase.NO_PERMISSION));
|
||||
ConfigHandler.inspecting.put(finalPlayer.getName(), false);
|
||||
return;
|
||||
}
|
||||
if (ConfigHandler.converterRunning) {
|
||||
Chat.sendMessage(finalPlayer, Color.DARK_AQUA + "CoreProtect " + Color.WHITE + "- " + Phrase.build(Phrase.UPGRADE_IN_PROGRESS));
|
||||
return;
|
||||
|
@ -69,6 +69,12 @@ public final class PlayerInteractListener extends Queue implements Listener {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!player.hasPermission("coreprotect.inspect")) {
|
||||
Chat.sendMessage(player, Color.DARK_AQUA + "CoreProtect " + Color.WHITE + "- " + Phrase.build(Phrase.NO_PERMISSION));
|
||||
ConfigHandler.inspecting.put(player.getName(), false);
|
||||
return;
|
||||
}
|
||||
|
||||
if (event.getAction().equals(Action.LEFT_CLICK_BLOCK)) {
|
||||
BlockState checkBlock = event.getClickedBlock().getState();
|
||||
int x = checkBlock.getX();
|
||||
@ -278,8 +284,8 @@ public final class PlayerInteractListener extends Queue implements Listener {
|
||||
if (ConfigHandler.lookupThrottle.get(player.getName()) != null) {
|
||||
Object[] lookupThrottle = ConfigHandler.lookupThrottle.get(player.getName());
|
||||
if ((boolean) lookupThrottle[0] || (System.currentTimeMillis() - (long) lookupThrottle[1]) < 100) {
|
||||
Chat.sendMessage(player, Color.DARK_AQUA + "CoreProtect " + Color.WHITE + "- " + Phrase.build(Phrase.DATABASE_BUSY));
|
||||
return;
|
||||
Chat.sendMessage(player, Color.DARK_AQUA + "CoreProtect " + Color.WHITE + "- " + Phrase.build(Phrase.DATABASE_BUSY));
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user