mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-26 23:26:45 +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 (!(sender instanceof Player)) {
|
||||||
if(args.length != 1) {
|
if(args.length != 1) {
|
||||||
sender.sendMessage("Usage: stats <username>");
|
sender.sendMessage("Usage: mcstats <username>");
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
Player temp = plugin.getServer().getPlayer(args[0]);
|
Player temp = plugin.getServer().getPlayer(args[0]);
|
||||||
|
@ -1,11 +1,13 @@
|
|||||||
package com.gmail.nossr50.commands.mc;
|
package com.gmail.nossr50.commands.mc;
|
||||||
|
|
||||||
|
import org.bukkit.ChatColor;
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
import org.bukkit.command.CommandExecutor;
|
import org.bukkit.command.CommandExecutor;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
import com.gmail.nossr50.Users;
|
import com.gmail.nossr50.Users;
|
||||||
|
import com.gmail.nossr50.mcPermissions;
|
||||||
import com.gmail.nossr50.config.LoadProperties;
|
import com.gmail.nossr50.config.LoadProperties;
|
||||||
import com.gmail.nossr50.datatypes.PlayerProfile;
|
import com.gmail.nossr50.datatypes.PlayerProfile;
|
||||||
import com.gmail.nossr50.locale.mcLocale;
|
import com.gmail.nossr50.locale.mcLocale;
|
||||||
@ -18,8 +20,8 @@ public class McabilityCommand implements CommandExecutor {
|
|||||||
player = (Player) sender;
|
player = (Player) sender;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (player != null && !player.hasPermission("mcmmo.commands.ability")) {
|
if (player != null && !mcPermissions.getInstance().mcAbility(player)) {
|
||||||
sender.sendMessage("This command requires permissions.");
|
player.sendMessage(ChatColor.YELLOW + "[mcMMO] " + ChatColor.DARK_RED + mcLocale.getString("mcPlayerListener.NoPermission"));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -42,7 +42,7 @@ public class MccCommand implements CommandExecutor {
|
|||||||
player.sendMessage("/ptp " + mcLocale.getString("m.mccPartyTeleport"));
|
player.sendMessage("/ptp " + mcLocale.getString("m.mccPartyTeleport"));
|
||||||
}
|
}
|
||||||
player.sendMessage(mcLocale.getString("m.mccOtherCommands"));
|
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"));
|
player.sendMessage("/mctop <skillname> <page> " + ChatColor.RED + mcLocale.getString("m.mccLeaderboards"));
|
||||||
|
|
||||||
if (mcPermissions.getInstance().mySpawn(player)) {
|
if (mcPermissions.getInstance().mySpawn(player)) {
|
||||||
|
@ -317,7 +317,7 @@ public class mcMMO extends JavaPlugin
|
|||||||
if(LoadProperties.mmoeditEnable) getCommand("mmoedit").setExecutor(new MmoeditCommand(this));
|
if(LoadProperties.mmoeditEnable) getCommand("mmoedit").setExecutor(new MmoeditCommand(this));
|
||||||
getCommand("mmoupdate").setExecutor(new MmoupdateCommand());
|
getCommand("mmoupdate").setExecutor(new MmoupdateCommand());
|
||||||
if(LoadProperties.myspawnEnable) getCommand("myspawn").setExecutor(new MyspawnCommand());
|
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.whoisEnable) getCommand("whois").setExecutor(new WhoisCommand(this));
|
||||||
if(LoadProperties.xprateEnable) getCommand("xprate").setExecutor(new XprateCommand());
|
if(LoadProperties.xprateEnable) getCommand("xprate").setExecutor(new XprateCommand());
|
||||||
|
|
||||||
|
@ -47,7 +47,7 @@ public class mcPermissions
|
|||||||
return player.hasPermission("mcmmo.item.chimaerawing");
|
return player.hasPermission("mcmmo.item.chimaerawing");
|
||||||
}
|
}
|
||||||
public boolean miningAbility(Player player){
|
public boolean miningAbility(Player player){
|
||||||
return player.hasPermission("mcmmo.ability.mining");
|
return player.hasPermission("mcmmo.ability.mining");
|
||||||
}
|
}
|
||||||
public boolean axesAbility(Player player){
|
public boolean axesAbility(Player player){
|
||||||
return player.hasPermission("mcmmo.ability.axes");
|
return player.hasPermission("mcmmo.ability.axes");
|
||||||
@ -103,6 +103,9 @@ public class mcPermissions
|
|||||||
public boolean mining(Player player) {
|
public boolean mining(Player player) {
|
||||||
return player.hasPermission("mcmmo.skills.mining");
|
return player.hasPermission("mcmmo.skills.mining");
|
||||||
}
|
}
|
||||||
|
public boolean blastmining(Player player) {
|
||||||
|
return player.hasPermission("mcmmo.skills.blastmining");
|
||||||
|
}
|
||||||
public boolean fishing(Player player) {
|
public boolean fishing(Player player) {
|
||||||
return player.hasPermission("mcmmo.skills.fishing");
|
return player.hasPermission("mcmmo.skills.fishing");
|
||||||
}
|
}
|
||||||
|
@ -1111,7 +1111,7 @@ Commands:
|
|||||||
Enabled: true
|
Enabled: true
|
||||||
accept:
|
accept:
|
||||||
Enabled: true
|
Enabled: true
|
||||||
stats:
|
mcstats:
|
||||||
Enabled: true
|
Enabled: true
|
||||||
mcability:
|
mcability:
|
||||||
Enabled: true
|
Enabled: true
|
||||||
|
@ -213,6 +213,7 @@ permissions:
|
|||||||
mcmmo.skills.swords: true
|
mcmmo.skills.swords: true
|
||||||
mcmmo.skills.axes: true
|
mcmmo.skills.axes: true
|
||||||
mcmmo.skills.acrobatics: true
|
mcmmo.skills.acrobatics: true
|
||||||
|
mcmmo.skills.blastmining: true
|
||||||
mcmmo.skills.taming:
|
mcmmo.skills.taming:
|
||||||
description:
|
description:
|
||||||
mcmmo.skills.mining:
|
mcmmo.skills.mining:
|
||||||
@ -235,3 +236,5 @@ permissions:
|
|||||||
description:
|
description:
|
||||||
mcmmo.skills.acrobatics:
|
mcmmo.skills.acrobatics:
|
||||||
description:
|
description:
|
||||||
|
mcmmo.skills.blastmining:
|
||||||
|
description:
|
||||||
|
Loading…
Reference in New Issue
Block a user