Импорт пакета

Link to импорт-пакета

It might be required for you to import the package if you encounter any issues (like casting an Array), so better be safe than sorry and add the import.
import crafttweaker.server.IServer;

Наследование от ICommandSender

Link to наследование-от-icommandsender

IServer extends ICommandSender, so all methods that are available for an ICommandSender object are also available for an IServer object.

Access the Server Handler

Link to access-the-server-handler

You can access the Server Handler using the server global keyword.
Alternatively you can get the server from any ICommandSender.

You can use this to check if an IPlayer has the OP permission:

ZenScript
Copy
server.isOp(player);

Get the command manager

Link to get-the-command-manager

You can use this to get the ICommandManager

ZenScript
Copy
server.commandManager;