mirror of
https://github.com/YouHaveTrouble/CommandWhitelist.git
synced 2026-05-12 14:36:56 +00:00
Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 023d9b57fe | |||
| eb13e174e9 | |||
| c2dd36d13b | |||
| be4d8d21c0 | |||
| 26b05aef7b | |||
| 687fd0867b | |||
| 733b556166 |
@@ -6,7 +6,7 @@
|
||||
|
||||
<groupId>eu.endermite</groupId>
|
||||
<artifactId>CommandWhitelist</artifactId>
|
||||
<version>1.0.1</version>
|
||||
<version>1.0.4</version>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<name>CommandWhitelist</name>
|
||||
|
||||
@@ -12,7 +12,7 @@ import java.util.Map;
|
||||
|
||||
public class PlayerCommandPreProcess implements Listener {
|
||||
|
||||
@EventHandler(priority = EventPriority.LOWEST)
|
||||
@EventHandler(priority = EventPriority.HIGHEST)
|
||||
public void PlayerCommandSendEvent(org.bukkit.event.player.PlayerCommandPreprocessEvent event) {
|
||||
Player player = event.getPlayer();
|
||||
|
||||
@@ -26,7 +26,9 @@ public class PlayerCommandPreProcess implements Listener {
|
||||
if (player.hasPermission("commandwhitelist.commands." + s.getKey())) {
|
||||
for (String comm : s.getValue()) {
|
||||
comm = comm.toLowerCase();
|
||||
if (command.startsWith("/" + comm)) {
|
||||
if (command.equalsIgnoreCase("/"+comm))
|
||||
return;
|
||||
else if (command.startsWith("/" + comm + " ")) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -34,7 +36,6 @@ public class PlayerCommandPreProcess implements Listener {
|
||||
}
|
||||
event.setCancelled(true);
|
||||
player.sendMessage(ChatColor.translateAlternateColorCodes('&', CommandWhitelist.getConfigCache().getPrefix() + " " + CommandWhitelist.getConfigCache().getCommandDenied()));
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@ import java.util.*;
|
||||
|
||||
public class PlayerCommandSend implements Listener {
|
||||
|
||||
@EventHandler(priority = EventPriority.HIGH)
|
||||
@EventHandler(priority = EventPriority.HIGHEST)
|
||||
public void PlayerCommandSendEvent(org.bukkit.event.player.PlayerCommandSendEvent event) {
|
||||
Player player = event.getPlayer();
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
name: CommandWhitelist
|
||||
version: ${project.version}
|
||||
main: eu.endermite.commandwhitelist.CommandWhitelist
|
||||
api-version: 1.16
|
||||
api-version: 1.13
|
||||
authors: [YouHaveTrouble]
|
||||
description: Control what commands players can use
|
||||
permissions:
|
||||
|
||||
Reference in New Issue
Block a user