Hotfix for new item flags

This commit is contained in:
PikaMug 2024-06-17 20:02:15 -04:00
parent aa79aebcc8
commit 8eec73bf04
2 changed files with 7 additions and 6 deletions

View File

@ -128,7 +128,8 @@ public class BukkitPlayerListener implements Listener {
for (final Quest quest : plugin.getLoadedQuests()) {
final BukkitQuest bukkitQuest = (BukkitQuest)quest;
if (bukkitQuest.getGUIDisplay() != null) {
if (BukkitItemUtil.compareItems(clicked, bukkitQuest.prepareDisplay(quester), false) == 0) {
final int i = BukkitItemUtil.compareItems(clicked, bukkitQuest.prepareDisplay(quester), false);
if (i == 0 || i == -7) {
if (quester.canAcceptOffer(quest, true)) {
try {
quester.takeQuest(quest, false);

View File

@ -51,8 +51,8 @@ public class BukkitItemUtil {
* -4 if stack display name/lore is unequal<br>
* -5 if stack enchantments are unequal<br>
* -6 if stack stored enchants are unequal<br>
* -7 if stack item flags are unequal
* -8 if stack Written Book data is unequal
* -7 if stack item flags are unequal<br>
* -8 if stack Written Book data is unequal<br>
* -9 if stack Potion type is unequal
*/
public static int compareItems(final ItemStack one, final ItemStack two, final boolean ignoreAmount) {
@ -75,9 +75,9 @@ public class BukkitItemUtil {
* -4 if stack display name/lore is unequal<br>
* -5 if stack enchantments are unequal<br>
* -6 if stack stored enchants are unequal<br>
* -7 if stack item flags are unequal
* -8 if stack Written Book data is unequal
* -9 if stack Potion type is unequal
* -7 if stack item flags are unequal<br>
* -8 if stack Written Book data is unequal<br>
* -9 if stack Potion type is unequal<br>
* -10 if stack Tropical Fish variant is unequal
*/
public static int compareItems(final ItemStack one, final ItemStack two, final boolean ignoreAmount,