Skip to content

Commit

Permalink
Set UUID in deprecated methods when available
Browse files Browse the repository at this point in the history
  • Loading branch information
Warriorrrr committed Oct 23, 2024
1 parent db72bbf commit bbf6da7
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ public Account(final EconomyHandler owner, final @NotNull String name, final @No
@Deprecated
public Account(EconomyHandler economyHandler, String name, World world) {
this.name = name;
this.uuid = economyHandler instanceof Identifiable identifiable ? identifiable.getUUID() : null;
this.economyHandler = economyHandler;

TownyWorld townyWorld = TownyAPI.getInstance().getTownyWorld(world);
Expand All @@ -94,6 +95,7 @@ public Account(EconomyHandler economyHandler, String name, World world) {
@Deprecated
public Account(EconomyHandler economyHandler, String name) {
this.name = name;
this.uuid = economyHandler instanceof Identifiable identifiable ? identifiable.getUUID() : null;
this.economyHandler = economyHandler;
this.worldSupplier = () -> TownyUniverse.getInstance().getTownyWorlds().get(0);
}
Expand Down

0 comments on commit bbf6da7

Please sign in to comment.