mirror of
https://github.com/kiranhart/Auction-House.git
synced 2025-02-02 17:01:23 +01:00
2.110.3 - 1.8 config fix (maybe)
Took 5 minutes
This commit is contained in:
parent
952566a710
commit
236447fbcf
4
pom.xml
4
pom.xml
@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
<name>AuctionHouse</name>
|
<name>AuctionHouse</name>
|
||||||
<description>The ultimate auction solution for your server</description>
|
<description>The ultimate auction solution for your server</description>
|
||||||
<version>2.110.1</version>
|
<version>2.110.3</version>
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
<properties>
|
<properties>
|
||||||
<author>Kiran Hart</author>
|
<author>Kiran Hart</author>
|
||||||
@ -119,7 +119,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>ca.tweetzy</groupId>
|
<groupId>ca.tweetzy</groupId>
|
||||||
<artifactId>tweetycore</artifactId>
|
<artifactId>tweetycore</artifactId>
|
||||||
<version>3.9.0</version>
|
<version>3.10.0</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.mineacademy.plugin</groupId>
|
<groupId>org.mineacademy.plugin</groupId>
|
||||||
|
@ -21,7 +21,6 @@ package ca.tweetzy.auctionhouse.helpers;
|
|||||||
import ca.tweetzy.auctionhouse.AuctionHouse;
|
import ca.tweetzy.auctionhouse.AuctionHouse;
|
||||||
import ca.tweetzy.core.compatibility.XMaterial;
|
import ca.tweetzy.core.compatibility.XMaterial;
|
||||||
import ca.tweetzy.flight.nbtapi.NBT;
|
import ca.tweetzy.flight.nbtapi.NBT;
|
||||||
import lombok.NonNull;
|
|
||||||
import lombok.experimental.UtilityClass;
|
import lombok.experimental.UtilityClass;
|
||||||
import org.bukkit.inventory.ItemStack;
|
import org.bukkit.inventory.ItemStack;
|
||||||
|
|
||||||
@ -35,7 +34,7 @@ public final class Validate {
|
|||||||
if (stack == null || stack.getType() == XMaterial.AIR.parseMaterial() || stack.getAmount() == 0) return false;
|
if (stack == null || stack.getType() == XMaterial.AIR.parseMaterial() || stack.getAmount() == 0) return false;
|
||||||
|
|
||||||
final UUID uuid = NBT.get(stack, nbt -> (UUID) nbt.getUUID("AuctionDupeTracking"));
|
final UUID uuid = NBT.get(stack, nbt -> (UUID) nbt.getUUID("AuctionDupeTracking"));
|
||||||
return AuctionHouse.getInstance().getAuctionItemManager().getItem(uuid) != null;
|
return uuid != null && AuctionHouse.getInstance().getAuctionItemManager().getItem(uuid) != null;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -204,34 +204,4 @@ public class BinListing extends AuctionItem {
|
|||||||
displayLore.add("&7&m-------------------------");
|
displayLore.add("&7&m-------------------------");
|
||||||
return displayLore;
|
return displayLore;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public ArrayList<String> wrapInBox(String[] strings) {
|
|
||||||
ArrayList<String> result = new ArrayList<>();
|
|
||||||
int maxLength = 0;
|
|
||||||
|
|
||||||
for (String s : strings) {
|
|
||||||
if (s.length() > maxLength) {
|
|
||||||
maxLength = s.length();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
String topAndBottom = "&7&m";
|
|
||||||
for (int i = 0; i < maxLength + 2; i++) {
|
|
||||||
topAndBottom += "-";
|
|
||||||
}
|
|
||||||
|
|
||||||
result.add(topAndBottom);
|
|
||||||
|
|
||||||
for (String s : strings) {
|
|
||||||
String paddedString = "&7| " + s;
|
|
||||||
while (paddedString.length() < maxLength + 2) {
|
|
||||||
paddedString += " ";
|
|
||||||
}
|
|
||||||
paddedString += " &7|";
|
|
||||||
result.add(paddedString);
|
|
||||||
}
|
|
||||||
result.add(topAndBottom);
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
}
|
}
|
@ -102,6 +102,7 @@ public class PlayerListeners implements Listener {
|
|||||||
if (item == null || item.getType() == XMaterial.AIR.parseMaterial() || item.getAmount() == 0) continue;
|
if (item == null || item.getType() == XMaterial.AIR.parseMaterial() || item.getAmount() == 0) continue;
|
||||||
|
|
||||||
final UUID auctionItemId = NBT.get(item, nbt -> (UUID) nbt.getUUID("AuctionDupeTracking"));
|
final UUID auctionItemId = NBT.get(item, nbt -> (UUID) nbt.getUUID("AuctionDupeTracking"));
|
||||||
|
if (auctionItemId == null) return;
|
||||||
|
|
||||||
if (AuctionHouse.getInstance().getAuctionItemManager().getItem(auctionItemId) != null) {
|
if (AuctionHouse.getInstance().getAuctionItemManager().getItem(auctionItemId) != null) {
|
||||||
player.getInventory().remove(item);
|
player.getInventory().remove(item);
|
||||||
|
Loading…
Reference in New Issue
Block a user