mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-02 08:39:49 +01:00
Cleaned up some command issues. Renamed /stats to /mcstats for less
plugin conflicts
This commit is contained in:
parent
3d5bb334f6
commit
98ed75e4e0
@ -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]);
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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)) {
|
||||
|
@ -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());
|
||||
|
||||
|
@ -47,7 +47,7 @@ public class mcPermissions
|
||||
return player.hasPermission("mcmmo.item.chimaerawing");
|
||||
}
|
||||
public boolean miningAbility(Player player){
|
||||
return player.hasPermission("mcmmo.ability.mining");
|
||||
return player.hasPermission("mcmmo.ability.mining");
|
||||
}
|
||||
public boolean axesAbility(Player player){
|
||||
return player.hasPermission("mcmmo.ability.axes");
|
||||
@ -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");
|
||||
}
|
||||
|
@ -1111,7 +1111,7 @@ Commands:
|
||||
Enabled: true
|
||||
accept:
|
||||
Enabled: true
|
||||
stats:
|
||||
mcstats:
|
||||
Enabled: true
|
||||
mcability:
|
||||
Enabled: true
|
||||
|
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user