Fixed Some Bugs and Added The Inventory Inspect Feature In The Staff Management System

This commit is contained in:
Trixkz 2023-10-26 22:57:38 -04:00
parent 97a24928fd
commit 918ee11ee5
2 changed files with 10 additions and 6 deletions

View File

@ -151,7 +151,9 @@ public class StaffModeListener implements Listener {
return; return;
} }
if (itemStack.getType() == Material.BOOK) { event.setCancelled(true);
if (itemStack.getType() != Material.BOOK) {
return; return;
} }
@ -159,7 +161,9 @@ public class StaffModeListener implements Listener {
return; return;
} }
event.setCancelled(true); Player target = (Player) event.getRightClicked();
player.openInventory(target.getInventory());
} }
@EventHandler @EventHandler

View File

@ -45,7 +45,9 @@ public class ChatManagementMenu extends Menu {
break; break;
case SOUL_SAND: case SOUL_SAND:
if (event.getClick().isLeftClick()) { if (event.getClick().isShiftClick()) {
this.main.getChatManager().slowChat(player, this.delayAmount);
} else if (event.getClick().isLeftClick()) {
this.delayAmount++; this.delayAmount++;
} else if (event.getClick().isRightClick()) { } else if (event.getClick().isRightClick()) {
if (this.delayAmount <= 0) { if (this.delayAmount <= 0) {
@ -53,8 +55,6 @@ public class ChatManagementMenu extends Menu {
} }
this.delayAmount--; this.delayAmount--;
} else if (event.getClick().isShiftClick()) {
this.main.getChatManager().slowChat(player, this.delayAmount);
} }
break; break;
@ -94,7 +94,7 @@ public class ChatManagementMenu extends Menu {
"&fSlowed By: &b" + (this.main.getChatManager().getSlowedBy() == null ? "None" : this.main.getServer().getOfflinePlayer(this.main.getChatManager().getSlowedBy()).getName()), "&fSlowed By: &b" + (this.main.getChatManager().getSlowedBy() == null ? "None" : this.main.getServer().getOfflinePlayer(this.main.getChatManager().getSlowedBy()).getName()),
"&fLast Slowed: &b" + (this.main.getChatManager().getLastSlowedTime() == 0 ? "Never" : Utils.getTimeAsAString(this.main.getChatManager().getLastSlowedTime())), "&fLast Slowed: &b" + (this.main.getChatManager().getLastSlowedTime() == 0 ? "Never" : Utils.getTimeAsAString(this.main.getChatManager().getLastSlowedTime())),
"", "",
"&bShift click to slow the chat for &3" + (this.delayAmount + " second" + (this.delayAmount > 1 ? "s" : "")), "&bShift click to slow the chat for &3" + (this.delayAmount + " &bsecond" + (this.delayAmount > 1 ? "s" : "")),
"", "",
"&fLeft Click: &b+1", "&fLeft Click: &b+1",
"&fRight Click: &b-1" "&fRight Click: &b-1"