mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-23 05:36:46 +01:00
Fixed inspect not working from console
This commit is contained in:
parent
652a27eb38
commit
4ab71bcf36
@ -83,8 +83,8 @@ public class Combat
|
|||||||
Axes.axeCriticalCheck(attacker, event, pluginx); //Critical hit
|
Axes.axeCriticalCheck(attacker, event, pluginx); //Critical hit
|
||||||
|
|
||||||
//Impact
|
//Impact
|
||||||
if(event.getEntity() instanceof LivingEntity)
|
//if(event.getEntity() instanceof LivingEntity)
|
||||||
Axes.impact(attacker, (LivingEntity)event.getEntity());
|
// Axes.impact(attacker, (LivingEntity)event.getEntity());
|
||||||
|
|
||||||
if (!(event instanceof FakeEntityDamageByEntityEvent) && PPa.getSkullSplitterMode())
|
if (!(event instanceof FakeEntityDamageByEntityEvent) && PPa.getSkullSplitterMode())
|
||||||
Axes.applyAoeDamage(attacker, event, pluginx);
|
Axes.applyAoeDamage(attacker, event, pluginx);
|
||||||
|
@ -30,7 +30,7 @@ public class InspectCommand implements CommandExecutor {
|
|||||||
player = (Player) sender;
|
player = (Player) sender;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (player != null && !mcPermissions.getInstance().inspect(player)) {
|
if (sender instanceof Player && !mcPermissions.getInstance().inspect(player)) {
|
||||||
sender.sendMessage(ChatColor.YELLOW + "[mcMMO] " + ChatColor.DARK_RED + mcLocale.getString("mcPlayerListener.NoPermission"));
|
sender.sendMessage(ChatColor.YELLOW + "[mcMMO] " + ChatColor.DARK_RED + mcLocale.getString("mcPlayerListener.NoPermission"));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -39,6 +39,7 @@ public class InspectCommand implements CommandExecutor {
|
|||||||
sender.sendMessage(ChatColor.RED + "Proper usage is /whois <playername>");
|
sender.sendMessage(ChatColor.RED + "Proper usage is /whois <playername>");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// if split[1] is a player
|
// if split[1] is a player
|
||||||
if (plugin.getServer().getPlayer(args[0]) != null)
|
if (plugin.getServer().getPlayer(args[0]) != null)
|
||||||
{
|
{
|
||||||
@ -68,7 +69,7 @@ public class InspectCommand implements CommandExecutor {
|
|||||||
sender.sendMessage(ChatColor.GOLD + "-=COMBAT SKILLS=-");
|
sender.sendMessage(ChatColor.GOLD + "-=COMBAT SKILLS=-");
|
||||||
if (mcPermissions.getInstance().axes(target))
|
if (mcPermissions.getInstance().axes(target))
|
||||||
sender.sendMessage(Skills.getSkillStats(mcLocale.getString("mcPlayerListener.AxesSkill"), PPt.getSkillLevel(SkillType.AXES), PPt.getSkillXpLevel(SkillType.AXES), PPt.getXpToLevel(SkillType.AXES)));
|
sender.sendMessage(Skills.getSkillStats(mcLocale.getString("mcPlayerListener.AxesSkill"), PPt.getSkillLevel(SkillType.AXES), PPt.getSkillXpLevel(SkillType.AXES), PPt.getXpToLevel(SkillType.AXES)));
|
||||||
if (mcPermissions.getInstance().archery(player))
|
if (mcPermissions.getInstance().archery(target))
|
||||||
sender.sendMessage(Skills.getSkillStats(mcLocale.getString("mcPlayerListener.ArcherySkill"), PPt.getSkillLevel(SkillType.ARCHERY), PPt.getSkillXpLevel(SkillType.ARCHERY), PPt.getXpToLevel(SkillType.ARCHERY)));
|
sender.sendMessage(Skills.getSkillStats(mcLocale.getString("mcPlayerListener.ArcherySkill"), PPt.getSkillLevel(SkillType.ARCHERY), PPt.getSkillXpLevel(SkillType.ARCHERY), PPt.getXpToLevel(SkillType.ARCHERY)));
|
||||||
if (mcPermissions.getInstance().swords(target))
|
if (mcPermissions.getInstance().swords(target))
|
||||||
sender.sendMessage(Skills.getSkillStats(mcLocale.getString("mcPlayerListener.SwordsSkill"), PPt.getSkillLevel(SkillType.SWORDS), PPt.getSkillXpLevel(SkillType.SWORDS), PPt.getXpToLevel(SkillType.SWORDS)));
|
sender.sendMessage(Skills.getSkillStats(mcLocale.getString("mcPlayerListener.SwordsSkill"), PPt.getSkillLevel(SkillType.SWORDS), PPt.getSkillXpLevel(SkillType.SWORDS), PPt.getXpToLevel(SkillType.SWORDS)));
|
||||||
|
Loading…
Reference in New Issue
Block a user