mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-25 22:56:45 +01:00
Fixed bug where trying to use /mctop or /xplock with the Smelting child
skill caused NPEs. Fixes #748
This commit is contained in:
parent
7814fa8d46
commit
a87336b7ee
@ -8,6 +8,7 @@ Key:
|
||||
- Removal
|
||||
|
||||
Version 1.4.01-dev
|
||||
= Fixed bug where trying to use /mctop or /xplock with the Smelting child skill caused NPEs
|
||||
|
||||
Version 1.4.00
|
||||
+ Added new Child Skill - Smelting!
|
||||
|
@ -31,7 +31,14 @@ public class MctopCommand implements CommandExecutor {
|
||||
display(Integer.parseInt(args[0]), "ALL", sender, useMySQL, command);
|
||||
}
|
||||
else if (SkillUtils.isSkill(args[0])) {
|
||||
display(1, SkillType.getSkill(args[0]).toString(), sender, useMySQL, command);
|
||||
SkillType skill = SkillType.getSkill(args[0]);
|
||||
|
||||
if (skill.isChildSkill()) {
|
||||
sender.sendMessage("Child skills are not yet supported by this command."); // TODO: Localize this
|
||||
return true;
|
||||
}
|
||||
|
||||
display(1, skill.toString(), sender, useMySQL, command);
|
||||
}
|
||||
else {
|
||||
sender.sendMessage(LocaleLoader.getString("Commands.Skill.Invalid"));
|
||||
@ -45,7 +52,14 @@ public class MctopCommand implements CommandExecutor {
|
||||
}
|
||||
|
||||
if (SkillUtils.isSkill(args[0])) {
|
||||
display(Integer.parseInt(args[1]), SkillType.getSkill(args[0]).toString(), sender, useMySQL, command);
|
||||
SkillType skill = SkillType.getSkill(args[0]);
|
||||
|
||||
if (skill.isChildSkill()) {
|
||||
sender.sendMessage("Child skills are not yet supported by this command."); // TODO: Localize this
|
||||
return true;
|
||||
}
|
||||
|
||||
display(Integer.parseInt(args[1]), skill.toString(), sender, useMySQL, command);
|
||||
}
|
||||
else {
|
||||
sender.sendMessage(LocaleLoader.getString("Commands.Skill.Invalid"));
|
||||
|
@ -39,6 +39,11 @@ public class XplockCommand extends SpoutCommand {
|
||||
|
||||
SkillType skill = SkillType.getSkill(args[0]);
|
||||
|
||||
if (skill.isChildSkill()) {
|
||||
sender.sendMessage("Child skills are not yet supported by this command."); // TODO: Localize this
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!Permissions.xplock(sender, skill)) {
|
||||
sender.sendMessage(command.getPermissionMessage());
|
||||
return true;
|
||||
|
Loading…
Reference in New Issue
Block a user