mirror of
https://github.com/TheDeus-Group/TFM-4.3-Reloaded.git
synced 2024-12-22 22:34:58 +00:00
use TotalFreedoMod.plugin instead of setup()
This commit is contained in:
parent
2d543a925a
commit
349704cfa5
2 changed files with 104 additions and 111 deletions
|
@ -4,106 +4,106 @@ import me.StevenLawson.TotalFreedomMod.TotalFreedomMod;
|
|||
|
||||
public class Commands {
|
||||
public static void registerCommands(TotalFreedomMod plugin) {
|
||||
plugin.getCommand("adminmode").setExecutor(new Command_adminmode().setup(plugin));
|
||||
plugin.getCommand("adminworld").setExecutor(new Command_adminworld().setup(plugin));
|
||||
plugin.getCommand("blockcmd").setExecutor(new Command_blockcmd().setup(plugin));
|
||||
plugin.getCommand("cage").setExecutor(new Command_cage().setup(plugin));
|
||||
plugin.getCommand("cake").setExecutor(new Command_cake().setup(plugin));
|
||||
plugin.getCommand("cartsit").setExecutor(new Command_cartsit().setup(plugin));
|
||||
plugin.getCommand("cbtool").setExecutor(new Command_cbtool().setup(plugin));
|
||||
plugin.getCommand("cmdlist").setExecutor(new Command_cmdlist().setup(plugin));
|
||||
plugin.getCommand("cmdspy").setExecutor(new Command_cmdspy().setup(plugin));
|
||||
plugin.getCommand("colorme").setExecutor(new Command_colorme().setup(plugin));
|
||||
plugin.getCommand("creative").setExecutor(new Command_creative().setup(plugin));
|
||||
plugin.getCommand("csay").setExecutor(new Command_csay().setup(plugin));
|
||||
plugin.getCommand("deafen").setExecutor(new Command_deafen().setup(plugin));
|
||||
plugin.getCommand("debug").setExecutor(new Command_debug().setup(plugin));
|
||||
plugin.getCommand("denick").setExecutor(new Command_denick().setup(plugin));
|
||||
plugin.getCommand("deop").setExecutor(new Command_deop().setup(plugin));
|
||||
plugin.getCommand("deopall").setExecutor(new Command_deopall().setup(plugin));
|
||||
plugin.getCommand("dispfill").setExecutor(new Command_dispfill().setup(plugin));
|
||||
plugin.getCommand("doom").setExecutor(new Command_doom().setup(plugin));
|
||||
plugin.getCommand("enchant").setExecutor(new Command_enchant().setup(plugin));
|
||||
plugin.getCommand("ender").setExecutor(new Command_ender().setup(plugin));
|
||||
plugin.getCommand("expel").setExecutor(new Command_expel().setup(plugin));
|
||||
plugin.getCommand("findip").setExecutor(new Command_findip().setup(plugin));
|
||||
plugin.getCommand("flatlands").setExecutor(new Command_flatlands().setup(plugin));
|
||||
plugin.getCommand("fr").setExecutor(new Command_fr().setup(plugin));
|
||||
plugin.getCommand("fuckoff").setExecutor(new Command_fuckoff().setup(plugin));
|
||||
plugin.getCommand("gadmin").setExecutor(new Command_gadmin().setup(plugin));
|
||||
plugin.getCommand("gcmd").setExecutor(new Command_gcmd().setup(plugin));
|
||||
plugin.getCommand("glist").setExecutor(new Command_glist().setup(plugin));
|
||||
plugin.getCommand("gtfo").setExecutor(new Command_gtfo().setup(plugin));
|
||||
plugin.getCommand("halt").setExecutor(new Command_halt().setup(plugin));
|
||||
plugin.getCommand("health").setExecutor(new Command_health().setup(plugin));
|
||||
plugin.getCommand("invis").setExecutor(new Command_invis().setup(plugin));
|
||||
plugin.getCommand("jumppads").setExecutor(new Command_jumppads().setup(plugin));
|
||||
plugin.getCommand("kicknoob").setExecutor(new Command_kicknoob().setup(plugin));
|
||||
plugin.getCommand("landmine").setExecutor(new Command_landmine().setup(plugin));
|
||||
plugin.getCommand("lastcmd").setExecutor(new Command_lastcmd().setup(plugin));
|
||||
plugin.getCommand("list").setExecutor(new Command_list().setup(plugin));
|
||||
plugin.getCommand("localspawn").setExecutor(new Command_localspawn().setup(plugin));
|
||||
plugin.getCommand("lockup").setExecutor(new Command_lockup().setup(plugin));
|
||||
plugin.getCommand("logs").setExecutor(new Command_logs().setup(plugin));
|
||||
plugin.getCommand("moblimiter").setExecutor(new Command_moblimiter().setup(plugin));
|
||||
plugin.getCommand("mp").setExecutor(new Command_mp().setup(plugin));
|
||||
plugin.getCommand("mp44").setExecutor(new Command_mp44().setup(plugin));
|
||||
plugin.getCommand("nether").setExecutor(new Command_nether().setup(plugin));
|
||||
plugin.getCommand("nf").setExecutor(new Command_nf().setup(plugin));
|
||||
plugin.getCommand("nickclean").setExecutor(new Command_nickclean().setup(plugin));
|
||||
plugin.getCommand("nicknyan").setExecutor(new Command_nicknyan().setup(plugin));
|
||||
plugin.getCommand("o").setExecutor(new Command_o().setup(plugin));
|
||||
plugin.getCommand("onlinemode").setExecutor(new Command_onlinemode().setup(plugin));
|
||||
plugin.getCommand("op").setExecutor(new Command_op().setup(plugin));
|
||||
plugin.getCommand("opall").setExecutor(new Command_opall().setup(plugin));
|
||||
plugin.getCommand("opme").setExecutor(new Command_opme().setup(plugin));
|
||||
plugin.getCommand("ops").setExecutor(new Command_ops().setup(plugin));
|
||||
plugin.getCommand("orbit").setExecutor(new Command_orbit().setup(plugin));
|
||||
plugin.getCommand("overlord").setExecutor(new Command_overlord().setup(plugin));
|
||||
plugin.getCommand("permban").setExecutor(new Command_permban().setup(plugin));
|
||||
plugin.getCommand("plugincontrol").setExecutor(new Command_plugincontrol().setup(plugin));
|
||||
plugin.getCommand("potion").setExecutor(new Command_potion().setup(plugin));
|
||||
plugin.getCommand("premium").setExecutor(new Command_premium().setup(plugin));
|
||||
plugin.getCommand("protectarea").setExecutor(new Command_protectarea().setup(plugin));
|
||||
plugin.getCommand("purgeall").setExecutor(new Command_purgeall().setup(plugin));
|
||||
plugin.getCommand("qdeop").setExecutor(new Command_qdeop().setup(plugin));
|
||||
plugin.getCommand("qop").setExecutor(new Command_qop().setup(plugin));
|
||||
plugin.getCommand("radar").setExecutor(new Command_radar().setup(plugin));
|
||||
plugin.getCommand("rank").setExecutor(new Command_rank().setup(plugin));
|
||||
plugin.getCommand("rawsay").setExecutor(new Command_rawsay().setup(plugin));
|
||||
plugin.getCommand("rd").setExecutor(new Command_rd().setup(plugin));
|
||||
plugin.getCommand("report").setExecutor(new Command_report().setup(plugin));
|
||||
plugin.getCommand("ro").setExecutor(new Command_ro().setup(plugin));
|
||||
plugin.getCommand("rollback").setExecutor(new Command_rollback().setup(plugin));
|
||||
plugin.getCommand("saconfig").setExecutor(new Command_saconfig().setup(plugin));
|
||||
plugin.getCommand("say").setExecutor(new Command_say().setup(plugin));
|
||||
plugin.getCommand("setl").setExecutor(new Command_setl().setup(plugin));
|
||||
plugin.getCommand("setlevel").setExecutor(new Command_setlevel().setup(plugin));
|
||||
plugin.getCommand("setlever").setExecutor(new Command_setlever().setup(plugin));
|
||||
plugin.getCommand("setspawnworld").setExecutor(new Command_setspawnworld().setup(plugin));
|
||||
plugin.getCommand("smite").setExecutor(new Command_smite().setup(plugin));
|
||||
plugin.getCommand("spectator").setExecutor(new Command_spectator().setup(plugin));
|
||||
plugin.getCommand("status").setExecutor(new Command_status().setup(plugin));
|
||||
plugin.getCommand("stfu").setExecutor(new Command_stfu().setup(plugin));
|
||||
plugin.getCommand("stop").setExecutor(new Command_stop().setup(plugin));
|
||||
plugin.getCommand("survival").setExecutor(new Command_survival().setup(plugin));
|
||||
plugin.getCommand("tag").setExecutor(new Command_tag().setup(plugin));
|
||||
plugin.getCommand("tagnyan").setExecutor(new Command_tagnyan().setup(plugin));
|
||||
plugin.getCommand("tban").setExecutor(new Command_tban().setup(plugin));
|
||||
plugin.getCommand("tempban").setExecutor(new Command_tempban().setup(plugin));
|
||||
plugin.getCommand("tfbanlist").setExecutor(new Command_tfbanlist().setup(plugin));
|
||||
plugin.getCommand("tfipbanlist").setExecutor(new Command_tfipbanlist().setup(plugin));
|
||||
plugin.getCommand("tfm").setExecutor(new CommandTFM().setup(plugin));
|
||||
plugin.getCommand("tfupdate").setExecutor(new Command_tfupdate().setup(plugin));
|
||||
plugin.getCommand("toggle").setExecutor(new Command_toggle().setup(plugin));
|
||||
plugin.getCommand("tossmob").setExecutor(new Command_tossmob().setup(plugin));
|
||||
plugin.getCommand("trail").setExecutor(new Command_trail().setup(plugin));
|
||||
plugin.getCommand("uuid").setExecutor(new Command_uuid().setup(plugin));
|
||||
plugin.getCommand("warn").setExecutor(new Command_warn().setup(plugin));
|
||||
plugin.getCommand("whitelist").setExecutor(new Command_whitelist().setup(plugin));
|
||||
plugin.getCommand("whohas").setExecutor(new Command_whohas().setup(plugin));
|
||||
plugin.getCommand("wildcard").setExecutor(new Command_wildcard().setup(plugin));
|
||||
plugin.getCommand("wipeflatlands").setExecutor(new Command_wipeflatlands().setup(plugin));
|
||||
plugin.getCommand("wipeuserdata").setExecutor(new Command_wipeuserdata().setup(plugin));
|
||||
plugin.getCommand("adminmode").setExecutor(new Command_adminmode());
|
||||
plugin.getCommand("adminworld").setExecutor(new Command_adminworld());
|
||||
plugin.getCommand("blockcmd").setExecutor(new Command_blockcmd());
|
||||
plugin.getCommand("cage").setExecutor(new Command_cage());
|
||||
plugin.getCommand("cake").setExecutor(new Command_cake());
|
||||
plugin.getCommand("cartsit").setExecutor(new Command_cartsit());
|
||||
plugin.getCommand("cbtool").setExecutor(new Command_cbtool());
|
||||
plugin.getCommand("cmdlist").setExecutor(new Command_cmdlist());
|
||||
plugin.getCommand("cmdspy").setExecutor(new Command_cmdspy());
|
||||
plugin.getCommand("colorme").setExecutor(new Command_colorme());
|
||||
plugin.getCommand("creative").setExecutor(new Command_creative());
|
||||
plugin.getCommand("csay").setExecutor(new Command_csay());
|
||||
plugin.getCommand("deafen").setExecutor(new Command_deafen());
|
||||
plugin.getCommand("debug").setExecutor(new Command_debug());
|
||||
plugin.getCommand("denick").setExecutor(new Command_denick());
|
||||
plugin.getCommand("deop").setExecutor(new Command_deop());
|
||||
plugin.getCommand("deopall").setExecutor(new Command_deopall());
|
||||
plugin.getCommand("dispfill").setExecutor(new Command_dispfill());
|
||||
plugin.getCommand("doom").setExecutor(new Command_doom());
|
||||
plugin.getCommand("enchant").setExecutor(new Command_enchant());
|
||||
plugin.getCommand("ender").setExecutor(new Command_ender());
|
||||
plugin.getCommand("expel").setExecutor(new Command_expel());
|
||||
plugin.getCommand("findip").setExecutor(new Command_findip());
|
||||
plugin.getCommand("flatlands").setExecutor(new Command_flatlands());
|
||||
plugin.getCommand("fr").setExecutor(new Command_fr());
|
||||
plugin.getCommand("fuckoff").setExecutor(new Command_fuckoff());
|
||||
plugin.getCommand("gadmin").setExecutor(new Command_gadmin());
|
||||
plugin.getCommand("gcmd").setExecutor(new Command_gcmd());
|
||||
plugin.getCommand("glist").setExecutor(new Command_glist());
|
||||
plugin.getCommand("gtfo").setExecutor(new Command_gtfo());
|
||||
plugin.getCommand("halt").setExecutor(new Command_halt());
|
||||
plugin.getCommand("health").setExecutor(new Command_health());
|
||||
plugin.getCommand("invis").setExecutor(new Command_invis());
|
||||
plugin.getCommand("jumppads").setExecutor(new Command_jumppads());
|
||||
plugin.getCommand("kicknoob").setExecutor(new Command_kicknoob());
|
||||
plugin.getCommand("landmine").setExecutor(new Command_landmine());
|
||||
plugin.getCommand("lastcmd").setExecutor(new Command_lastcmd());
|
||||
plugin.getCommand("list").setExecutor(new Command_list());
|
||||
plugin.getCommand("localspawn").setExecutor(new Command_localspawn());
|
||||
plugin.getCommand("lockup").setExecutor(new Command_lockup());
|
||||
plugin.getCommand("logs").setExecutor(new Command_logs());
|
||||
plugin.getCommand("moblimiter").setExecutor(new Command_moblimiter());
|
||||
plugin.getCommand("mp").setExecutor(new Command_mp());
|
||||
plugin.getCommand("mp44").setExecutor(new Command_mp44());
|
||||
plugin.getCommand("nether").setExecutor(new Command_nether());
|
||||
plugin.getCommand("nf").setExecutor(new Command_nf());
|
||||
plugin.getCommand("nickclean").setExecutor(new Command_nickclean());
|
||||
plugin.getCommand("nicknyan").setExecutor(new Command_nicknyan());
|
||||
plugin.getCommand("o").setExecutor(new Command_o());
|
||||
plugin.getCommand("onlinemode").setExecutor(new Command_onlinemode());
|
||||
plugin.getCommand("op").setExecutor(new Command_op());
|
||||
plugin.getCommand("opall").setExecutor(new Command_opall());
|
||||
plugin.getCommand("opme").setExecutor(new Command_opme());
|
||||
plugin.getCommand("ops").setExecutor(new Command_ops());
|
||||
plugin.getCommand("orbit").setExecutor(new Command_orbit());
|
||||
plugin.getCommand("overlord").setExecutor(new Command_overlord());
|
||||
plugin.getCommand("permban").setExecutor(new Command_permban());
|
||||
plugin.getCommand("plugincontrol").setExecutor(new Command_plugincontrol());
|
||||
plugin.getCommand("potion").setExecutor(new Command_potion());
|
||||
plugin.getCommand("premium").setExecutor(new Command_premium());
|
||||
plugin.getCommand("protectarea").setExecutor(new Command_protectarea());
|
||||
plugin.getCommand("purgeall").setExecutor(new Command_purgeall());
|
||||
plugin.getCommand("qdeop").setExecutor(new Command_qdeop());
|
||||
plugin.getCommand("qop").setExecutor(new Command_qop());
|
||||
plugin.getCommand("radar").setExecutor(new Command_radar());
|
||||
plugin.getCommand("rank").setExecutor(new Command_rank());
|
||||
plugin.getCommand("rawsay").setExecutor(new Command_rawsay());
|
||||
plugin.getCommand("rd").setExecutor(new Command_rd());
|
||||
plugin.getCommand("report").setExecutor(new Command_report());
|
||||
plugin.getCommand("ro").setExecutor(new Command_ro());
|
||||
plugin.getCommand("rollback").setExecutor(new Command_rollback());
|
||||
plugin.getCommand("saconfig").setExecutor(new Command_saconfig());
|
||||
plugin.getCommand("say").setExecutor(new Command_say());
|
||||
plugin.getCommand("setl").setExecutor(new Command_setl());
|
||||
plugin.getCommand("setlevel").setExecutor(new Command_setlevel());
|
||||
plugin.getCommand("setlever").setExecutor(new Command_setlever());
|
||||
plugin.getCommand("setspawnworld").setExecutor(new Command_setspawnworld());
|
||||
plugin.getCommand("smite").setExecutor(new Command_smite());
|
||||
plugin.getCommand("spectator").setExecutor(new Command_spectator());
|
||||
plugin.getCommand("status").setExecutor(new Command_status());
|
||||
plugin.getCommand("stfu").setExecutor(new Command_stfu());
|
||||
plugin.getCommand("stop").setExecutor(new Command_stop());
|
||||
plugin.getCommand("survival").setExecutor(new Command_survival());
|
||||
plugin.getCommand("tag").setExecutor(new Command_tag());
|
||||
plugin.getCommand("tagnyan").setExecutor(new Command_tagnyan());
|
||||
plugin.getCommand("tban").setExecutor(new Command_tban());
|
||||
plugin.getCommand("tempban").setExecutor(new Command_tempban());
|
||||
plugin.getCommand("tfbanlist").setExecutor(new Command_tfbanlist());
|
||||
plugin.getCommand("tfipbanlist").setExecutor(new Command_tfipbanlist());
|
||||
plugin.getCommand("tfm").setExecutor(new CommandTFM());
|
||||
plugin.getCommand("tfupdate").setExecutor(new Command_tfupdate());
|
||||
plugin.getCommand("toggle").setExecutor(new Command_toggle());
|
||||
plugin.getCommand("tossmob").setExecutor(new Command_tossmob());
|
||||
plugin.getCommand("trail").setExecutor(new Command_trail());
|
||||
plugin.getCommand("uuid").setExecutor(new Command_uuid());
|
||||
plugin.getCommand("warn").setExecutor(new Command_warn());
|
||||
plugin.getCommand("whitelist").setExecutor(new Command_whitelist());
|
||||
plugin.getCommand("whohas").setExecutor(new Command_whohas());
|
||||
plugin.getCommand("wildcard").setExecutor(new Command_wildcard());
|
||||
plugin.getCommand("wipeflatlands").setExecutor(new Command_wipeflatlands());
|
||||
plugin.getCommand("wipeuserdata").setExecutor(new Command_wipeuserdata());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,6 +5,7 @@ import me.StevenLawson.TotalFreedomMod.TotalFreedomMod;
|
|||
import me.StevenLawson.TotalFreedomMod.admin.AdminList;
|
||||
import me.StevenLawson.TotalFreedomMod.player.PlayerData;
|
||||
import me.StevenLawson.TotalFreedomMod.util.Utilities;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.Server;
|
||||
import org.bukkit.command.Command;
|
||||
|
@ -20,8 +21,8 @@ public abstract class FreedomCommand implements CommandExecutor {
|
|||
public static final String YOU_ARE_NOT_OP = ChatColor.YELLOW + "You are no longer op!";
|
||||
public static final String NOT_FROM_CONSOLE = "This command may not be used from the console.";
|
||||
public static final String PLAYER_NOT_FOUND = ChatColor.GRAY + "Player not found!";
|
||||
protected TotalFreedomMod plugin;
|
||||
protected Server server;
|
||||
protected TotalFreedomMod plugin = TotalFreedomMod.plugin;
|
||||
protected Server server = Bukkit.getServer();
|
||||
|
||||
public FreedomCommand() {
|
||||
}
|
||||
|
@ -43,14 +44,6 @@ public abstract class FreedomCommand implements CommandExecutor {
|
|||
|
||||
abstract public boolean run(final CommandSender sender, final org.bukkit.entity.Player sender_p, final Command cmd, final String commandLabel, final String[] args, final boolean senderIsConsole);
|
||||
|
||||
public FreedomCommand setup(final TotalFreedomMod plugin)
|
||||
{
|
||||
this.plugin = plugin;
|
||||
this.server = plugin.getServer();
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
public void playerMsg(final CommandSender sender, final String message, final ChatColor color)
|
||||
{
|
||||
if (sender == null)
|
||||
|
|
Loading…
Reference in a new issue