mirror of
https://github.com/AtlasMediaGroup/TotalFreedomMod.git
synced 2025-06-11 13:33:54 +00:00
Improvements
This commit is contained in:
@ -8,17 +8,21 @@ import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
@CommandPermissions(level = Rank.SUPER_ADMIN, source = SourceType.ONLY_CONSOLE)
|
||||
@CommandParameters(description = "Telnet command - Send a chat message with chat formatting over telnet.", usage = "/<command> <message...>", aliases = "csay")
|
||||
@CommandParameters(description = "Telnet command - Send a chat message with chat formatting over telnet.", usage = "/<command> <message>", aliases = "csay")
|
||||
public class Command_consolesay extends FreedomCommand
|
||||
{
|
||||
|
||||
@Override
|
||||
public boolean run(CommandSender sender, Player playerSender, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
|
||||
{
|
||||
if (args.length > 0)
|
||||
if (args.length == 0)
|
||||
{
|
||||
FUtil.bcastMsg(String.format("§7[CONSOLE]§f<§c%s§f> %s", sender.getName(), StringUtils.join(args, " ")));
|
||||
return false;
|
||||
}
|
||||
|
||||
String message = StringUtils.join(args, " ");
|
||||
plugin.cm.checkMentions(message);
|
||||
FUtil.bcastMsg(String.format("§7[CONSOLE] §f<§c%s§f> %s", sender.getName(), StringUtils.join(args, " ")));
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -40,6 +40,8 @@ public class Command_say extends FreedomCommand
|
||||
}
|
||||
}
|
||||
|
||||
plugin.cm.checkMentions(message);
|
||||
|
||||
FUtil.bcastMsg(String.format("[Server:%s] %s", sender.getName(), message), ChatColor.LIGHT_PURPLE);
|
||||
|
||||
return true;
|
||||
|
@ -62,6 +62,7 @@ public class Command_stfu extends FreedomCommand
|
||||
count++;
|
||||
}
|
||||
}
|
||||
plugin.mu.MUTED_PLAYERS.clear();
|
||||
msg("Unmuted " + count + " players.");
|
||||
return true;
|
||||
}
|
||||
|
@ -1,7 +1,6 @@
|
||||
package me.totalfreedom.totalfreedommod.command;
|
||||
|
||||
import me.totalfreedom.totalfreedommod.GameRuleHandler;
|
||||
import me.totalfreedom.totalfreedommod.TotalFreedomMod;
|
||||
import me.totalfreedom.totalfreedommod.config.ConfigEntry;
|
||||
import me.totalfreedom.totalfreedommod.rank.Rank;
|
||||
import me.totalfreedom.totalfreedommod.util.FUtil;
|
||||
@ -70,7 +69,7 @@ public class Command_toggle extends FreedomCommand
|
||||
else if (args[0].equals("firespread"))
|
||||
{
|
||||
toggle("Fire spread is", ConfigEntry.ALLOW_FIRE_SPREAD);
|
||||
((TotalFreedomMod)this.plugin).gr.setGameRule(GameRuleHandler.GameRule.DO_FIRE_TICK, ConfigEntry.ALLOW_FIRE_SPREAD.getBoolean());
|
||||
plugin.gr.setGameRule(GameRuleHandler.GameRule.DO_FIRE_TICK, ConfigEntry.ALLOW_FIRE_SPREAD.getBoolean());
|
||||
return true;
|
||||
}
|
||||
else if (args[0].equals("prelog"))
|
||||
|
@ -25,27 +25,13 @@ public class Command_wipeflatlands extends FreedomCommand
|
||||
player.kickPlayer("Server is going offline for flatlands wipe, come back in a few minutes.");
|
||||
}
|
||||
|
||||
if (!plugin.cpb.isEnabled())
|
||||
if (!plugin.amp.enabled)
|
||||
{
|
||||
if(!plugin.amp.enabled)
|
||||
{
|
||||
server.shutdown();
|
||||
}
|
||||
else
|
||||
{
|
||||
plugin.amp.restartServer();
|
||||
}
|
||||
server.shutdown();
|
||||
}
|
||||
else
|
||||
{
|
||||
new BukkitRunnable()
|
||||
{
|
||||
@Override
|
||||
public void run()
|
||||
{
|
||||
plugin.cpb.clearDatabase(plugin.wm.flatlands.getWorld(), true);
|
||||
}
|
||||
}.runTaskAsynchronously(plugin);
|
||||
plugin.amp.restartServer();
|
||||
}
|
||||
|
||||
return true;
|
||||
|
Reference in New Issue
Block a user