Adds increased detection and optional refunding of signs broken by non-players
This commit is contained in:
@@ -49,16 +49,17 @@ public final class TrackedSignManager {
|
||||
* Removes a tracked sign from the manager
|
||||
*
|
||||
* @param signLocation <p>The location the sign was removed from</p>
|
||||
* @param refund <p>Whether to perform a refund after un-tracking the sign</p>
|
||||
* @throws IOException <p>If unable to save the tracked signs</p>
|
||||
*/
|
||||
public static void removeTrackedSign(Location signLocation) throws IOException {
|
||||
public static void removeTrackedSign(Location signLocation, boolean refund) throws IOException {
|
||||
if (!trackedSigns.containsKey(signLocation)) {
|
||||
return;
|
||||
}
|
||||
TrackedSign trackedSign = trackedSigns.get(signLocation);
|
||||
trackedSigns.remove(signLocation);
|
||||
saveTrackedSigns();
|
||||
if (!PaidSigns.getInstance().areRefundsEnabled()) {
|
||||
if (!PaidSigns.getInstance().areRefundsEnabled() || !refund) {
|
||||
return;
|
||||
}
|
||||
OfflinePlayer offlinePlayer = Bukkit.getOfflinePlayer(trackedSign.getPlayerId());
|
||||
|
Reference in New Issue
Block a user