Fix an annoying quest NPE
This commit is contained in:
parent
b699ef475d
commit
dd40ebbff5
@ -1,5 +1,9 @@
|
||||
package nautilus.game.arcade.quest;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Objects;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.Listener;
|
||||
|
||||
@ -63,7 +67,7 @@ public class QuestTracker<T extends Game> implements Listener
|
||||
boolean cont = true;
|
||||
for (String questItem : quest.getItem())
|
||||
{
|
||||
for (String str : items)
|
||||
for (String str : Arrays.stream(items).filter(Objects::nonNull).collect(Collectors.toList()))
|
||||
{
|
||||
String first = str.replaceAll(" ", "");
|
||||
String compare = questItem.replaceAll(" ", "");
|
||||
|
Loading…
Reference in New Issue
Block a user