forked from Upstream/mmocore
Admin reset commands have been fixed.
Resetting skills no longer resets attributes and vice versa.
This commit is contained in:
parent
f314627f21
commit
2677882d0b
@ -116,11 +116,11 @@ public class ResetCommandMap extends CommandEnd {
|
||||
}
|
||||
|
||||
PlayerData data = PlayerData.get(player);
|
||||
data.setAttributePoints(0);
|
||||
data.setAttributeReallocationPoints(0);
|
||||
for(PlayerAttribute att : MMOCore.plugin.attributeManager.getAll())
|
||||
data.setAttribute(att, 0);
|
||||
sender.sendMessage(ChatColor.GOLD + player.getName() + ChatColor.YELLOW + "'s attribute data was succesfully reset.");
|
||||
data.setSkillPoints(0);
|
||||
MMOCore.plugin.skillManager.getAll().forEach(skill -> data.lockSkill(skill));
|
||||
while (data.hasSkillBound(0))
|
||||
data.unbindSkill(0);
|
||||
sender.sendMessage(ChatColor.GOLD + player.getName() + ChatColor.YELLOW + "'s skill data was succesfully reset.");
|
||||
return CommandResult.SUCCESS;
|
||||
}
|
||||
}
|
||||
@ -144,11 +144,11 @@ public class ResetCommandMap extends CommandEnd {
|
||||
}
|
||||
|
||||
PlayerData data = PlayerData.get(player);
|
||||
data.setSkillPoints(0);
|
||||
MMOCore.plugin.skillManager.getAll().forEach(skill -> data.lockSkill(skill));
|
||||
while (data.hasSkillBound(0))
|
||||
data.unbindSkill(0);
|
||||
sender.sendMessage(ChatColor.GOLD + player.getName() + ChatColor.YELLOW + "'s skill data was succesfully reset.");
|
||||
data.setAttributePoints(0);
|
||||
data.setAttributeReallocationPoints(0);
|
||||
for(PlayerAttribute att : MMOCore.plugin.attributeManager.getAll())
|
||||
data.setAttribute(att, 0);
|
||||
sender.sendMessage(ChatColor.GOLD + player.getName() + ChatColor.YELLOW + "'s attribute data was succesfully reset.");
|
||||
return CommandResult.SUCCESS;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user