diff --git a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Class/ClassManager.java b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Class/ClassManager.java index f5d09bba1..b1bf213e3 100644 --- a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Class/ClassManager.java +++ b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Class/ClassManager.java @@ -13,12 +13,15 @@ import mineplex.minecraft.game.classcombat.item.ItemFactory; import mineplex.core.MiniClientPlugin; import mineplex.core.account.CoreClientManager; import mineplex.core.account.event.ClientWebResponseEvent; +import mineplex.core.common.Rank; +import mineplex.core.common.util.UtilPlayer; import mineplex.core.donation.DonationManager; import mineplex.core.updater.event.UpdateEvent; import mineplex.core.updater.UpdateType; import org.bukkit.Material; import org.bukkit.craftbukkit.libs.com.google.gson.Gson; +import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; import org.bukkit.event.player.PlayerCommandPreprocessEvent; import org.bukkit.plugin.java.JavaPlugin; @@ -303,12 +306,30 @@ public class ClassManager extends MiniClientPlugin implements IClas if (!_enabled) return; - if (event.getMessage().equals("/skill")) + if (event.getMessage().length() < 1) + return; + + String[] args = event.getMessage().toLowerCase().split(" "); + + if (args[0].equals("/skill")) { - ClientClass client = Get(event.getPlayer().getName()); + Player target = event.getPlayer(); + + //Target Other + if (args.length > 1 && _clientManager.Get(event.getPlayer()).GetRank().has(Rank.MODERATOR)) + { + target = UtilPlayer.searchOnline(event.getPlayer(), args[1], true); + + if (target == null) + { + return; + } + } + + ClientClass client = Get(target.getName()); if (client == null) - event.getPlayer().sendMessage("You do not have a ClientClass."); + event.getPlayer().sendMessage(target.getName() + " does not have a ClientClass."); else { client.DisplaySkills(event.getPlayer());