mirror of
https://github.com/CarmJos/cn2b2t-project.git
synced 2026-06-04 08:48:16 +08:00
添加指令黑名单
This commit is contained in:
@@ -8,10 +8,10 @@ import com.comphenix.protocol.events.PacketAdapter;
|
||||
import com.comphenix.protocol.events.PacketContainer;
|
||||
import com.comphenix.protocol.events.PacketEvent;
|
||||
import com.comphenix.protocol.reflect.FieldAccessException;
|
||||
import org.cn2b2t.core.Main;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.Listener;
|
||||
import org.bukkit.event.player.PlayerCommandPreprocessEvent;
|
||||
import org.cn2b2t.core.Main;
|
||||
|
||||
public final class TabCompleteListener implements Listener {
|
||||
|
||||
@@ -37,6 +37,7 @@ public final class TabCompleteListener implements Listener {
|
||||
|| shouldCancel(message, "//")
|
||||
|| shouldCancel(message, "/cmi")
|
||||
|| shouldCancel(message, "/mcpay")
|
||||
|| shouldCancel(message, "/version")
|
||||
|| shouldCancel(message, "/help")
|
||||
|| shouldCancel(message, "/bukkit:")
|
||||
|| shouldCancel(message, "/minecraft:")) {
|
||||
@@ -58,6 +59,8 @@ public final class TabCompleteListener implements Listener {
|
||||
if (message.equalsIgnoreCase("/")
|
||||
|| shouldCancel(message, "//")
|
||||
|| message.startsWith("/minecraft:")
|
||||
|| message.startsWith("/version")
|
||||
|| message.startsWith("/ver")
|
||||
|| message.startsWith("/bukkit:")
|
||||
|| message.startsWith("/help")) {
|
||||
e.setCancelled(true);
|
||||
|
||||
Reference in New Issue
Block a user