Skip to content

Commit

Permalink
improve server security
Browse files Browse the repository at this point in the history
  • Loading branch information
NightDev701 committed Jan 11, 2025
1 parent ec4826e commit 2a131c9
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/main/java/org/scorpion/listener/HoneyCommandListener.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,19 @@ public class HoneyCommandListener implements Listener {
@EventHandler
public void on(PlayerCommandPreprocessEvent e) {
Player p = e.getPlayer();
String cmd = e.getMessage().split(" ")[0];
String cmd = e.getMessage().split(" ")[0].toLowerCase();

if (HoneyAPI.hideServerDetails()) {
if (cmd.equalsIgnoreCase("/bukkit:") ||
cmd.equalsIgnoreCase("/minecraft:") ||
if (cmd.startsWith("/bukkit:") ||
cmd.startsWith("/minecraft:") ||
cmd.equalsIgnoreCase("/version") ||
cmd.equalsIgnoreCase("/icanhasbukkit") ||
cmd.equalsIgnoreCase("/?") ||
cmd.equalsIgnoreCase("/about") ||
cmd.equalsIgnoreCase("/pl") ||
cmd.equalsIgnoreCase("/me") ||
cmd.equalsIgnoreCase("/help") ||
cmd.equalsIgnoreCase("/ver") ||
cmd.equalsIgnoreCase("/bungee")) {
cmd.equalsIgnoreCase("/ver")) {
if (!p.hasPermission(HoneyAPI.getPermission("admin"))) {
HoneyAPI.sendNoPermission(p);
e.setCancelled(true);
Expand Down

0 comments on commit 2a131c9

Please sign in to comment.