IServer
Link to iserver
パッケージのインポート
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;
Extending ICommandSender
Link to extending-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.
Check if a
Link to check-if-a-player-is-op
You can use this to check if an IPlayer has the OP permission:
ZenScript Copyserver.isOp(player);
Get the command manager
Link to get-the-command-manager
You can use this to get the ICommandManager
ZenScript Copyserver.commandManager;