mirror of
				https://github.com/mcMMO-Dev/mcMMO.git
				synced 2025-10-25 07:23:43 +02:00 
			
		
		
		
	Cleaned up some command issues. Renamed /stats to /mcstats for less
plugin conflicts
This commit is contained in:
		| @@ -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()); | ||||
| 		 | ||||
|   | ||||
| @@ -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: | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 GJ
					GJ