Squash some bugs

This commit is contained in:
BuildTools 2018-12-10 18:24:48 -05:00
parent 9c1c19d623
commit 1f6a410723
3 changed files with 11 additions and 9 deletions

View File

@ -178,7 +178,7 @@ public class Event {
} else if (other.teleport == null && teleport != null) {
return false;
}
if (other.book != book) {
if (!other.book.equals(book)) {
return false;
}
}
@ -259,11 +259,13 @@ public class Event {
if (teleport != null) {
player.teleport(teleport);
}
if (!(book == null && book.isEmpty())) {
if (Quests.citizensBooks != null) {
if (Quests.citizensBooks.hasFilter(book)) {
Quests.citizensBooks.openBook(player, Quests.citizensBooks.getFilter(book));
}
if (book != null) {
if (!book.isEmpty()) {
if (Quests.citizensBooks != null) {
if (Quests.citizensBooks.hasFilter(book)) {
Quests.citizensBooks.openBook(player, Quests.citizensBooks.getFilter(book));
}
}
}
}
if (failQuest == true) {

View File

@ -699,10 +699,10 @@ public class Quest {
if (other.orderedStages.equals(orderedStages) == false) {
return false;
}
if (other.startPlanner != startPlanner) {
if (!other.startPlanner.equals(startPlanner)) {
return false;
}
if (other.endPlanner != endPlanner) {
if (!other.endPlanner.equals(endPlanner)) {
return false;
}
if (other.repeatPlanner != repeatPlanner) {

View File

@ -260,7 +260,7 @@ public class ItemUtil {
if (!lore.isEmpty()) {
meta.setLore(lore);
}
if (flags[0] != null && flags[0].toString() != "") {
if (flags[0] != null && flags[0].toString().equals("")) {
for (ItemFlag flag : flags) {
if (flag != null) {
try {