2013-07-13 20:11:13 +00:00
|
|
|
package me.StevenLawson.TotalFreedomMod.Commands;
|
|
|
|
|
2014-05-16 13:18:24 +00:00
|
|
|
import me.StevenLawson.TotalFreedomMod.Config.TFM_ConfigEntry;
|
2014-04-23 14:23:50 +00:00
|
|
|
import me.StevenLawson.TotalFreedomMod.TFM_AdminList;
|
|
|
|
import me.StevenLawson.TotalFreedomMod.TFM_BanManager;
|
|
|
|
import me.StevenLawson.TotalFreedomMod.TFM_CommandBlocker;
|
|
|
|
import me.StevenLawson.TotalFreedomMod.TFM_Log;
|
|
|
|
import me.StevenLawson.TotalFreedomMod.TFM_PermbanList;
|
|
|
|
import me.StevenLawson.TotalFreedomMod.TFM_PlayerList;
|
2013-07-13 20:11:13 +00:00
|
|
|
import me.StevenLawson.TotalFreedomMod.TotalFreedomMod;
|
|
|
|
import org.bukkit.ChatColor;
|
|
|
|
import org.bukkit.command.Command;
|
|
|
|
import org.bukkit.command.CommandSender;
|
|
|
|
import org.bukkit.entity.Player;
|
|
|
|
|
2014-08-02 15:10:54 +00:00
|
|
|
/*
|
|
|
|
* See https://github.com/TotalFreedom/License - This file may not be edited or removed.
|
|
|
|
*/
|
2013-07-13 20:11:13 +00:00
|
|
|
@CommandPermissions(level = AdminLevel.ALL, source = SourceType.BOTH)
|
2014-04-23 14:23:50 +00:00
|
|
|
@CommandParameters(description = "Shows information about TotalFreedomMod or reloads it", usage = "/<command> [reload]")
|
2013-07-14 12:10:29 +00:00
|
|
|
public class Command_tfm extends TFM_Command
|
|
|
|
{
|
2013-07-13 20:11:13 +00:00
|
|
|
@Override
|
|
|
|
public boolean run(CommandSender sender, Player sender_p, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
|
2013-08-10 00:11:17 +00:00
|
|
|
{
|
2014-04-23 14:23:50 +00:00
|
|
|
if (args.length == 1)
|
|
|
|
{
|
|
|
|
if (!args[0].equals("reload"))
|
|
|
|
{
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!TFM_AdminList.isSuperAdmin(sender))
|
|
|
|
{
|
|
|
|
playerMsg(TotalFreedomMod.MSG_NO_PERMS);
|
2014-06-30 15:30:16 +00:00
|
|
|
return true;
|
2014-04-23 14:23:50 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
TFM_AdminList.load();
|
|
|
|
TFM_PermbanList.load();
|
2014-05-19 17:32:25 +00:00
|
|
|
TFM_PlayerList.load();
|
|
|
|
TFM_BanManager.load();
|
|
|
|
TFM_CommandBlocker.load();
|
2014-04-23 14:23:50 +00:00
|
|
|
|
|
|
|
|
|
|
|
final String message = String.format("%s v%s.%s reloaded.",
|
|
|
|
TotalFreedomMod.pluginName,
|
|
|
|
TotalFreedomMod.pluginVersion,
|
|
|
|
TotalFreedomMod.buildNumber);
|
|
|
|
|
|
|
|
playerMsg(message);
|
|
|
|
TFM_Log.info(message);
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
2014-04-21 17:00:39 +00:00
|
|
|
playerMsg("TotalFreedomMod for 'Total Freedom', the original all-op server.", ChatColor.GOLD);
|
2014-04-21 12:37:53 +00:00
|
|
|
playerMsg(String.format("Version "
|
|
|
|
+ ChatColor.BLUE + "%s.%s" + ChatColor.GOLD + ", built "
|
|
|
|
+ ChatColor.BLUE + "%s" + ChatColor.GOLD + " by "
|
|
|
|
+ ChatColor.BLUE + "%s" + ChatColor.GOLD + ".",
|
|
|
|
TotalFreedomMod.pluginVersion,
|
|
|
|
TotalFreedomMod.buildNumber,
|
|
|
|
TotalFreedomMod.buildDate,
|
|
|
|
TotalFreedomMod.buildCreator), ChatColor.GOLD);
|
2014-05-16 13:18:24 +00:00
|
|
|
playerMsg("Running on " + TFM_ConfigEntry.SERVER_NAME.getString() + ".", ChatColor.GOLD);
|
2013-07-13 20:11:13 +00:00
|
|
|
playerMsg("Created by Madgeek1450 and DarthSalamon.", ChatColor.GOLD);
|
2013-08-04 18:48:50 +00:00
|
|
|
playerMsg("Visit " + ChatColor.AQUA + "http://totalfreedom.me/" + ChatColor.GREEN + " for more information.", ChatColor.GREEN);
|
2013-07-13 20:11:13 +00:00
|
|
|
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|