Is it good practice using commandpreprocess events to block commands?

Status
This thread has been locked.

CodeBeaster

Banned
Feedback score
0
Posts
114
Reactions
32
Resources
0
Basically, i just wanted to know if it is good, or bad practice using the CommandPreprocess event to block some commands, i see it as an easier approach rather than re-creating the whole command.

What do you think? :I
 
PebbleHost
High performance, consistent uptime and fast support. Minecraft hosting that just works.

user7089

I deleted discord. Clones are scams.
Premium
Feedback score
5
Posts
137
Reactions
112
Resources
0
Okay, where do I start, so okay...
1: if you are planning to block commands you need to get the command itself and check if it has alliases so something like: getCommand("mebypassblock").getName("me")
2: Override the command, if something is wrong with it: getCommand("me").setExecutor(new NewMeCommand())
 
Status
This thread has been locked.
Top