mirror of
https://github.com/Crazy-Crew/CrazyAuctions.git
synced 2024-11-21 11:45:11 +01:00
add target uuid key
This commit is contained in:
parent
3f52824e5b
commit
d7e3f775d6
@ -17,6 +17,8 @@ public enum Keys {
|
||||
// any button in the gui
|
||||
auction_button("auction_button", PersistentDataType.STRING),
|
||||
|
||||
auction_uuid("auction_uuid", PersistentDataType.STRING),
|
||||
|
||||
// contains the auction item price
|
||||
auction_price("auction_price", PersistentDataType.INTEGER);
|
||||
|
||||
|
@ -265,7 +265,11 @@ public class AuctionsMenu extends Holder {
|
||||
|
||||
final UUID uuid = player.getUniqueId();
|
||||
|
||||
final AuctionItem auction = this.userManager.getAuctionItemById(uuid, container.getOrDefault(Keys.auction_store_id.getNamespacedKey(), PersistentDataType.STRING, ""));
|
||||
final String target_uuid = container.getOrDefault(Keys.auction_uuid.getNamespacedKey(), PersistentDataType.STRING, "");
|
||||
|
||||
if (target_uuid.isEmpty()) return;
|
||||
|
||||
final AuctionItem auction = this.userManager.getAuctionItemById(UUID.fromString(target_uuid), container.getOrDefault(Keys.auction_store_id.getNamespacedKey(), PersistentDataType.STRING, ""));
|
||||
|
||||
if (auction == null) return;
|
||||
|
||||
|
@ -169,7 +169,8 @@ public class AuctionItem {
|
||||
|
||||
itemBuilder.setLore(lore)
|
||||
.addString(this.id, Keys.auction_number.getNamespacedKey())
|
||||
.addString(getStoreID(), Keys.auction_store_id.getNamespacedKey());
|
||||
.addString(getStoreID(), Keys.auction_store_id.getNamespacedKey())
|
||||
.addString(this.uuid.toString(), Keys.auction_uuid.getNamespacedKey());
|
||||
|
||||
return itemBuilder;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user