CommandSay.java 782 B

12345678910111213141516171819202122232425262728
  1. package me.km.commands;
  2. import me.km.KajetansMod;
  3. import me.km.api.Module;
  4. import me.km.api.ModuleCommand;
  5. import me.km.api.Utils;
  6. import me.km.permissions.Permissions;
  7. import net.minecraft.command.ICommandSender;
  8. import net.minecraft.util.text.TextComponentString;
  9. public class CommandSay extends ModuleCommand
  10. {
  11. public CommandSay(Module m)
  12. {
  13. super("say", m);
  14. super.setDescription("Lässt den Server sprechen");
  15. super.setUsage("/say");
  16. super.setPermission(Permissions.SAY);
  17. }
  18. @Override
  19. public boolean execute(ICommandSender cs, String[] arg)
  20. {
  21. KajetansMod.server.getPlayerList().sendMessage(
  22. new TextComponentString("[§cServer§r] " + Utils.connectSpaces(arg, 0)));
  23. return true;
  24. }
  25. }