Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- case "chat": {
- Player p = (Player) s;
- if (s instanceof Player) {
- if (p.hasPermission("keebe.chat") || p.isOp()) {
- if (args.length == 0) {
- s.sendMessage(fixColor("&8# &cCos poszlo nie tak! &8[&2/chat clear|on|off&8]"));
- } else {
- if (args[0].equalsIgnoreCase("clear")) {
- for (int i = 0; i < 100; i++) {
- for(Player online : Bukkit.getOnlinePlayers()) {
- online.sendMessage(fixColor(""));
- }
- }
- Bukkit.getServer().broadcastMessage(fixColor("&8# &fCzat zostal wyczyszczony."));
- }
- if (args[0].equalsIgnoreCase("on")) {
- if(!(chatStatus)) {
- chatStatus = true;
- Bukkit.getServer().broadcastMessage(fixColor("&8# &fCzat zostal wlaczony."));
- } else {
- p.sendMessage(fixColor("&8# &7Czat jest juz wlaczony!"));
- return true;
- }
- }
- if (args[0].equalsIgnoreCase("off")) {
- if(chatStatus) {
- chatStatus = false;
- Bukkit.getServer().broadcastMessage(fixColor("&8# &fCzat zostal wylaczony."));
- } else {
- p.sendMessage(fixColor("&8# &7Czat jest juz wylaczony!"));
- return true;
- }
- }
- }
- } else {
- s.sendMessage(fixColor("&8# &cBrak uprawnien."));
- }
- } else {
- s.sendMessage(fixColor("&8# &cKonsola nie moze wykonywac takich komend!"));
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement