Skip to content

ZenUtilsCommandSender

youyihj edited this page Aug 16, 2020 · 1 revision

ZenUtilsCommandSender

ZenUtilsCommandSender is ZenUtils' speacial ICommandSender object. That means all of ICommandSender's methods are also available on this object!

Importing the package

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 mods.zenutils.command.ZenUtilsCommandSender;

Warning

Never instanceof or cast to ICommandSender's subclass! It will always return false or throw ClassCastException! If you want to tranform it to player, you should call CommandUtils::getCommandSenderAsPlayer.

Clone this wiki locally