fix trustlist being reset on server stop
This commit is contained in:
parent
f603b07ff7
commit
c0f616db56
2
pom.xml
2
pom.xml
@ -4,7 +4,7 @@
|
|||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<groupId>Me.EtienneDx</groupId>
|
<groupId>Me.EtienneDx</groupId>
|
||||||
<artifactId>RealEstate</artifactId>
|
<artifactId>RealEstate</artifactId>
|
||||||
<version>0.1.1-SNAPSHOT</version>
|
<version>0.1.2-SNAPSHOT</version>
|
||||||
<name>RealEstate</name>
|
<name>RealEstate</name>
|
||||||
<description>A spigot plugin for selling, renting and leasing GriefPrevention claims</description>
|
<description>A spigot plugin for selling, renting and leasing GriefPrevention claims</description>
|
||||||
<build>
|
<build>
|
||||||
|
|||||||
@ -203,6 +203,7 @@ public class RECommand extends BaseCommand
|
|||||||
}
|
}
|
||||||
bt.exitOffer = null;
|
bt.exitOffer = null;
|
||||||
claim.dropPermission(bt.buyer.toString());
|
claim.dropPermission(bt.buyer.toString());
|
||||||
|
GriefPrevention.instance.dataStore.saveClaim(claim);
|
||||||
bt.buyer = null;
|
bt.buyer = null;
|
||||||
bt.update();// eventual cancel is contained in here
|
bt.update();// eventual cancel is contained in here
|
||||||
}
|
}
|
||||||
|
|||||||
@ -297,6 +297,7 @@ public class ClaimLease extends BoughtTransaction
|
|||||||
lastPayment = LocalDateTime.now();
|
lastPayment = LocalDateTime.now();
|
||||||
paymentsLeft--;
|
paymentsLeft--;
|
||||||
claim.setPermission(buyer.toString(), ClaimPermission.Build);
|
claim.setPermission(buyer.toString(), ClaimPermission.Build);
|
||||||
|
GriefPrevention.instance.dataStore.saveClaim(claim);
|
||||||
getHolder().breakNaturally();// leases don't have signs indicating the remaining time
|
getHolder().breakNaturally();// leases don't have signs indicating the remaining time
|
||||||
update();
|
update();
|
||||||
RealEstate.transactionsStore.saveData();
|
RealEstate.transactionsStore.saveData();
|
||||||
@ -334,8 +335,6 @@ public class ClaimLease extends BoughtTransaction
|
|||||||
player.sendMessage(RealEstate.instance.config.chatPrefix + ChatColor.AQUA + "You have successfully paid lease for this " + claimType +
|
player.sendMessage(RealEstate.instance.config.chatPrefix + ChatColor.AQUA + "You have successfully paid lease for this " + claimType +
|
||||||
" for " + ChatColor.GREEN + price + " " + RealEstate.econ.currencyNamePlural() + ChatColor.AQUA + ", " +
|
" for " + ChatColor.GREEN + price + " " + RealEstate.econ.currencyNamePlural() + ChatColor.AQUA + ", " +
|
||||||
ChatColor.GREEN + paymentsLeft + ChatColor.AQUA + " payments left");
|
ChatColor.GREEN + paymentsLeft + ChatColor.AQUA + " payments left");
|
||||||
|
|
||||||
destroySign();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -117,6 +117,7 @@ public class ClaimRent extends BoughtTransaction
|
|||||||
{
|
{
|
||||||
Claim claim = GriefPrevention.instance.dataStore.getClaimAt(sign, false, null);
|
Claim claim = GriefPrevention.instance.dataStore.getClaimAt(sign, false, null);
|
||||||
claim.dropPermission(buyer.toString());
|
claim.dropPermission(buyer.toString());
|
||||||
|
GriefPrevention.instance.dataStore.saveClaim(claim);
|
||||||
if(msgBuyer && Bukkit.getOfflinePlayer(buyer).isOnline() && RealEstate.instance.config.cfgMessageBuyer)
|
if(msgBuyer && Bukkit.getOfflinePlayer(buyer).isOnline() && RealEstate.instance.config.cfgMessageBuyer)
|
||||||
{
|
{
|
||||||
Bukkit.getPlayer(buyer).sendMessage(RealEstate.instance.config.chatPrefix + ChatColor.AQUA +
|
Bukkit.getPlayer(buyer).sendMessage(RealEstate.instance.config.chatPrefix + ChatColor.AQUA +
|
||||||
@ -274,6 +275,7 @@ public class ClaimRent extends BoughtTransaction
|
|||||||
startDate = LocalDateTime.now();
|
startDate = LocalDateTime.now();
|
||||||
autoRenew = false;
|
autoRenew = false;
|
||||||
claim.setPermission(buyer.toString(), ClaimPermission.Build);
|
claim.setPermission(buyer.toString(), ClaimPermission.Build);
|
||||||
|
GriefPrevention.instance.dataStore.saveClaim(claim);
|
||||||
update();
|
update();
|
||||||
RealEstate.transactionsStore.saveData();
|
RealEstate.transactionsStore.saveData();
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user