CommandSilent.java 885 B

1234567891011121314151617181920212223242526272829303132333435
  1. package me.km.commands;
  2. import me.km.api.Module;
  3. import me.km.api.ModuleCommand;
  4. import me.km.permissions.Permissions;
  5. import net.minecraft.command.ICommandSender;
  6. public class CommandSilent extends ModuleCommand
  7. {
  8. public boolean silentjoin;
  9. public CommandSilent(Module m)
  10. {
  11. super("silent", m);
  12. super.setDescription("Stellt den Silent-Join an oder aus");
  13. super.setUsage("/silent");
  14. super.setPermission(Permissions.SILENT);
  15. silentjoin = false;
  16. }
  17. @Override
  18. public boolean execute(ICommandSender cs, String[] arg)
  19. {
  20. if(silentjoin)
  21. {
  22. silentjoin = false;
  23. this.getModule().send(cs, "Silent Join ist nun aus.");
  24. return true;
  25. }
  26. silentjoin = true;
  27. this.getModule().send(cs, "Silent Join ist nun an.");
  28. return true;
  29. }
  30. }