Skip to content

Commit

Permalink
Fix Bounties Bug (Fixes Team-Inceptus#106)
Browse files Browse the repository at this point in the history
  • Loading branch information
gmitch215 committed Sep 5, 2023
1 parent e44f9d9 commit 110f072
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,7 @@ public Bounty build() throws UnsupportedOperationException, IllegalArgumentExcep

owner.stats.totalBountiesCreated++;
data.put(key, b);
owner.save();

NovaPlayer targetN = new NovaPlayer(target);
targetN.stats.totalBountiesHad++;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -479,7 +479,7 @@ public Map<OfflinePlayer, Bounty> getOwnedBounties() {
Map<OfflinePlayer, Bounty> bounties = new HashMap<>();

for (Map.Entry<String, Object> entry : pConfig.entrySet()) {
if (!entry.getKey().startsWith("bounty.")) continue;
if (!entry.getKey().startsWith("bounties.")) continue;

OfflinePlayer target = Bukkit.getOfflinePlayer(UUID.fromString(entry.getKey().split("\\.")[1]));
if (target == null) continue;
Expand Down

0 comments on commit 110f072

Please sign in to comment.