mirror of
https://github.com/Zrips/Jobs.git
synced 2025-02-18 13:21:41 +01:00
Lets save the jobs points after bought an item from jobs shop
This commit is contained in:
parent
ea3cc04998
commit
2177261786
@ -258,6 +258,7 @@ public class ShopManager {
|
||||
}
|
||||
|
||||
pointsInfo.takePoints(item.getPrice());
|
||||
Jobs.getJobsDAO().savePoints(jPlayer);
|
||||
player.sendMessage(Jobs.getLanguage().getMessage("command.shop.info.Paid", "%amount%", item.getPrice()));
|
||||
|
||||
}
|
||||
|
@ -91,20 +91,26 @@ public class JobsPlayer {
|
||||
|
||||
public void addPoints(Double points) {
|
||||
getPointsData().addPoints(points);
|
||||
Jobs.getJobsDAO().savePoints(this);
|
||||
}
|
||||
|
||||
public void takePoints(Double points) {
|
||||
getPointsData().takePoints(points);
|
||||
Jobs.getJobsDAO().savePoints(this);
|
||||
}
|
||||
|
||||
public void setPoints(Double points) {
|
||||
getPointsData().setPoints(points);
|
||||
Jobs.getJobsDAO().savePoints(this);
|
||||
}
|
||||
|
||||
public void setPoints(PlayerPoints points) {
|
||||
getPointsData().setPoints(points.getCurrentPoints());
|
||||
getPointsData().setTotalPoints(points.getTotalPoints());
|
||||
getPointsData().setNewEntry(points.isNewEntry());
|
||||
PlayerPoints data = getPointsData();
|
||||
data.setPoints(points.getCurrentPoints());
|
||||
data.setTotalPoints(points.getTotalPoints());
|
||||
data.setNewEntry(points.isNewEntry());
|
||||
|
||||
Jobs.getJobsDAO().savePoints(this);
|
||||
}
|
||||
|
||||
public boolean havePoints(double points) {
|
||||
|
Loading…
Reference in New Issue
Block a user