make shop id a UUID
This commit is contained in:
parent
cf4431326e
commit
819cbdcd93
|
|
@ -21,7 +21,7 @@ import java.util.UUID;
|
||||||
public class PlayerShop {
|
public class PlayerShop {
|
||||||
|
|
||||||
@Getter
|
@Getter
|
||||||
private int id;
|
private UUID shopID;
|
||||||
@Getter @Setter // TODO a way to check if the player changed name and update if needed
|
@Getter @Setter // TODO a way to check if the player changed name and update if needed
|
||||||
private String ownerName;
|
private String ownerName;
|
||||||
@Getter
|
@Getter
|
||||||
|
|
@ -50,6 +50,7 @@ public class PlayerShop {
|
||||||
}
|
}
|
||||||
|
|
||||||
public PlayerShop(Location shopLocation, Location signLocation, UUID uuid, String playerName) {
|
public PlayerShop(Location shopLocation, Location signLocation, UUID uuid, String playerName) {
|
||||||
|
this.shopID = UUID.randomUUID();
|
||||||
this.shopLocation = shopLocation;
|
this.shopLocation = shopLocation;
|
||||||
this.signLocation = signLocation;
|
this.signLocation = signLocation;
|
||||||
this.ownerUUID = uuid;
|
this.ownerUUID = uuid;
|
||||||
|
|
@ -57,12 +58,12 @@ public class PlayerShop {
|
||||||
updateSign();
|
updateSign();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static PlayerShop create(int id, String ownerName, UUID ownerUUID, ShopType shopType, String server,
|
public static PlayerShop create(UUID shopID, String ownerName, UUID ownerUUID, ShopType shopType, String server,
|
||||||
Location shopLocation, Location signLocation, double price, int amount,
|
Location shopLocation, Location signLocation, double price, int amount,
|
||||||
double balance, ItemStack item, long lastTransaction) {
|
double balance, ItemStack item, long lastTransaction) {
|
||||||
PlayerShop playerShop = new PlayerShop(shopLocation, signLocation, ownerUUID, ownerName);
|
PlayerShop playerShop = new PlayerShop(shopLocation, signLocation, ownerUUID, ownerName);
|
||||||
|
|
||||||
playerShop.id = id;
|
playerShop.shopID = shopID;
|
||||||
playerShop.type = shopType;
|
playerShop.type = shopType;
|
||||||
playerShop.server = server;
|
playerShop.server = server;
|
||||||
playerShop.price = price;
|
playerShop.price = price;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user