Delays refunding on startup to prevent a crash
This commit is contained in:
parent
b0c3fea730
commit
d50d9b42c4
@ -104,9 +104,11 @@ public final class TrackedSignManager {
|
|||||||
|
|
||||||
//Prevent destroyed signs from being tracked indefinitely
|
//Prevent destroyed signs from being tracked indefinitely
|
||||||
if (!(signLocation.getBlock().getState() instanceof Sign)) {
|
if (!(signLocation.getBlock().getState() instanceof Sign)) {
|
||||||
PaidSigns.getInstance().getLogger().log(Level.WARNING, "The sign at " + signLocation + " no longer " +
|
Bukkit.getScheduler().scheduleSyncDelayedTask(PaidSigns.getInstance(), () -> {
|
||||||
"exists. Removing from sign tracker. Refunding the player.");
|
PaidSigns.getInstance().getLogger().log(Level.WARNING, "The sign at " + signLocation +
|
||||||
refund(trackedSign, true);
|
" no longer exists. Removing from sign tracker. Refunding the player.");
|
||||||
|
refund(trackedSign, true);
|
||||||
|
}, 100);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user