player's attributes updates if gui change
This commit is contained in:
parent
9fdb944f94
commit
9bedf456db
1 changed files with 3 additions and 0 deletions
|
@ -1,6 +1,7 @@
|
|||
package me.unurled.sacredrealms.sr.gui.attributes;
|
||||
|
||||
import static me.unurled.sacredrealms.sr.utils.Component.comp;
|
||||
import static me.unurled.sacredrealms.sr.utils.SRPlayerUtils.syncSRToPlayer;
|
||||
|
||||
import me.unurled.sacredrealms.sr.components.attributes.Attribute;
|
||||
import me.unurled.sacredrealms.sr.components.player.PlayerManager;
|
||||
|
@ -95,6 +96,8 @@ public class AttributeItem extends AbstractItem {
|
|||
sp.setAttribute(attribute, sp.getAttribute(attribute) - 10);
|
||||
}
|
||||
playerManager.savePlayer(sp);
|
||||
// update player
|
||||
syncSRToPlayer(sp, targetPlayer);
|
||||
notifyWindows();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue