Cleaned up some command issues. Renamed /stats to /mcstats for less

plugin conflicts
This commit is contained in:
GJ 2012-02-22 09:52:58 -05:00
parent 3d5bb334f6
commit 98ed75e4e0
7 changed files with 15 additions and 7 deletions

View File

@ -37,7 +37,7 @@ public class StatsCommand implements CommandExecutor {
if (!(sender instanceof Player)) {
if(args.length != 1) {
sender.sendMessage("Usage: stats <username>");
sender.sendMessage("Usage: mcstats <username>");
return true;
} else {
Player temp = plugin.getServer().getPlayer(args[0]);

View File

@ -1,11 +1,13 @@
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.Users;
import com.gmail.nossr50.mcPermissions;
import com.gmail.nossr50.config.LoadProperties;
import com.gmail.nossr50.datatypes.PlayerProfile;
import com.gmail.nossr50.locale.mcLocale;
@ -18,8 +20,8 @@ public class McabilityCommand implements CommandExecutor {
player = (Player) sender;
}
if (player != null && !player.hasPermission("mcmmo.commands.ability")) {
sender.sendMessage("This command requires permissions.");
if (player != null && !mcPermissions.getInstance().mcAbility(player)) {
player.sendMessage(ChatColor.YELLOW + "[mcMMO] " + ChatColor.DARK_RED + mcLocale.getString("mcPlayerListener.NoPermission"));
return true;
}

View File

@ -42,7 +42,7 @@ public class MccCommand implements CommandExecutor {
player.sendMessage("/ptp " + mcLocale.getString("m.mccPartyTeleport"));
}
player.sendMessage(mcLocale.getString("m.mccOtherCommands"));
player.sendMessage("/stats " + ChatColor.RED + " " + mcLocale.getString("m.mccStats"));
player.sendMessage("/mcstats " + ChatColor.RED + " " + mcLocale.getString("m.mccStats"));
player.sendMessage("/mctop <skillname> <page> " + ChatColor.RED + mcLocale.getString("m.mccLeaderboards"));
if (mcPermissions.getInstance().mySpawn(player)) {

View File

@ -317,7 +317,7 @@ public class mcMMO extends JavaPlugin
if(LoadProperties.mmoeditEnable) getCommand("mmoedit").setExecutor(new MmoeditCommand(this));
getCommand("mmoupdate").setExecutor(new MmoupdateCommand());
if(LoadProperties.myspawnEnable) getCommand("myspawn").setExecutor(new MyspawnCommand());
if(LoadProperties.statsEnable) getCommand("stats").setExecutor(new StatsCommand(this));
if(LoadProperties.statsEnable) getCommand("mcstats").setExecutor(new StatsCommand(this));
if(LoadProperties.whoisEnable) getCommand("whois").setExecutor(new WhoisCommand(this));
if(LoadProperties.xprateEnable) getCommand("xprate").setExecutor(new XprateCommand());

View File

@ -103,6 +103,9 @@ public class mcPermissions
public boolean mining(Player player) {
return player.hasPermission("mcmmo.skills.mining");
}
public boolean blastmining(Player player) {
return player.hasPermission("mcmmo.skills.blastmining");
}
public boolean fishing(Player player) {
return player.hasPermission("mcmmo.skills.fishing");
}

View File

@ -1111,7 +1111,7 @@ Commands:
Enabled: true
accept:
Enabled: true
stats:
mcstats:
Enabled: true
mcability:
Enabled: true

View File

@ -213,6 +213,7 @@ permissions:
mcmmo.skills.swords: true
mcmmo.skills.axes: true
mcmmo.skills.acrobatics: true
mcmmo.skills.blastmining: true
mcmmo.skills.taming:
description:
mcmmo.skills.mining:
@ -235,3 +236,5 @@ permissions:
description:
mcmmo.skills.acrobatics:
description:
mcmmo.skills.blastmining:
description: