2012-01-09 20:00:13 +01:00
|
|
|
package com.gmail.nossr50.commands.mc;
|
|
|
|
|
|
|
|
import org.bukkit.ChatColor;
|
|
|
|
import org.bukkit.command.Command;
|
|
|
|
import org.bukkit.command.CommandExecutor;
|
|
|
|
import org.bukkit.command.CommandSender;
|
|
|
|
import org.bukkit.entity.Player;
|
|
|
|
|
|
|
|
import com.gmail.nossr50.mcPermissions;
|
|
|
|
import com.gmail.nossr50.config.LoadProperties;
|
|
|
|
import com.gmail.nossr50.locale.mcLocale;
|
|
|
|
|
|
|
|
public class MccCommand implements CommandExecutor {
|
|
|
|
@Override
|
|
|
|
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
|
|
|
if (!LoadProperties.mccEnable) {
|
|
|
|
sender.sendMessage("This command is not enabled.");
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!(sender instanceof Player)) {
|
|
|
|
sender.sendMessage("This command does not support console useage.");
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
Player player = (Player) sender;
|
|
|
|
|
|
|
|
player.sendMessage(ChatColor.RED + "---[]" + ChatColor.YELLOW + "mcMMO Commands" + ChatColor.RED + "[]---");
|
|
|
|
|
|
|
|
if (mcPermissions.getInstance().party(player)) {
|
|
|
|
player.sendMessage(mcLocale.getString("m.mccPartyCommands"));
|
2012-01-31 09:36:07 +01:00
|
|
|
player.sendMessage("/party " + mcLocale.getString("m.mccParty"));
|
|
|
|
player.sendMessage("/party q " + mcLocale.getString("m.mccPartyQ"));
|
2012-01-09 20:00:13 +01:00
|
|
|
|
|
|
|
if (mcPermissions.getInstance().partyChat(player))
|
|
|
|
player.sendMessage("/p " + mcLocale.getString("m.mccPartyToggle"));
|
|
|
|
|
2012-01-31 09:36:07 +01:00
|
|
|
player.sendMessage("/invite " + mcLocale.getString("m.mccPartyInvite"));
|
|
|
|
player.sendMessage("/invite " + mcLocale.getString("m.mccPartyAccept"));
|
2012-01-09 20:00:13 +01:00
|
|
|
|
|
|
|
if (mcPermissions.getInstance().partyTeleport(player))
|
2012-01-31 09:36:07 +01:00
|
|
|
player.sendMessage("/ptp " + mcLocale.getString("m.mccPartyTeleport"));
|
2012-01-09 20:00:13 +01:00
|
|
|
}
|
|
|
|
player.sendMessage(mcLocale.getString("m.mccOtherCommands"));
|
2012-01-31 09:36:07 +01:00
|
|
|
player.sendMessage("/stats " + ChatColor.RED + " " + mcLocale.getString("m.mccStats"));
|
2012-01-09 20:00:13 +01:00
|
|
|
player.sendMessage("/mctop <skillname> <page> " + ChatColor.RED + mcLocale.getString("m.mccLeaderboards"));
|
|
|
|
|
|
|
|
if (mcPermissions.getInstance().mySpawn(player)) {
|
2012-01-31 09:36:07 +01:00
|
|
|
player.sendMessage("/myspawn " + ChatColor.RED + mcLocale.getString("m.mccMySpawn"));
|
|
|
|
player.sendMessage("/clearmyspawn " + ChatColor.RED + mcLocale.getString("m.mccClearMySpawn"));
|
2012-01-09 20:00:13 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
if (mcPermissions.getInstance().mcAbility(player))
|
2012-01-31 09:36:07 +01:00
|
|
|
player.sendMessage("/mcability" + ChatColor.RED + " " + mcLocale.getString("m.mccToggleAbility"));
|
2012-01-09 20:00:13 +01:00
|
|
|
|
|
|
|
if (mcPermissions.getInstance().adminChat(player))
|
|
|
|
player.sendMessage("/a " + ChatColor.RED + mcLocale.getString("m.mccAdminToggle"));
|
|
|
|
|
|
|
|
if (mcPermissions.getInstance().whois(player))
|
2012-01-31 09:36:07 +01:00
|
|
|
player.sendMessage("/whois " + mcLocale.getString("m.mccWhois"));
|
2012-01-09 20:00:13 +01:00
|
|
|
|
|
|
|
if (mcPermissions.getInstance().mmoedit(player))
|
2012-01-31 09:36:07 +01:00
|
|
|
player.sendMessage("/mmoedit" + mcLocale.getString("m.mccMmoedit"));
|
2012-01-09 20:00:13 +01:00
|
|
|
|
|
|
|
if (mcPermissions.getInstance().mcgod(player))
|
2012-01-31 09:36:07 +01:00
|
|
|
player.sendMessage("/mcgod" + ChatColor.RED + " " + mcLocale.getString("m.mccMcGod"));
|
2012-01-09 20:00:13 +01:00
|
|
|
|
|
|
|
player.sendMessage(mcLocale.getString("m.mccSkillInfo"));
|
2012-01-31 09:36:07 +01:00
|
|
|
player.sendMessage("/mcmmo " + mcLocale.getString("m.mccModDescription"));
|
2012-01-09 20:00:13 +01:00
|
|
|
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|