diff --git a/pom.xml b/pom.xml
index 224235a..8ccf72a 100644
--- a/pom.xml
+++ b/pom.xml
@@ -110,7 +110,7 @@
org.spigotmc
spigot-api
- 1.19-R0.1-SNAPSHOT
+ 1.19.2-R0.1-SNAPSHOT
provided
@@ -122,7 +122,7 @@
com.github.cryptomorin
XSeries
- 8.8.0
+ 9.0.0
com.github.fierioziy.particlenativeapi
diff --git a/src/main/java/nl/sbdeveloper/showapi/gui/ShowCueGUI.java b/src/main/java/nl/sbdeveloper/showapi/gui/ShowCueGUI.java
index b481b12..90a3afe 100644
--- a/src/main/java/nl/sbdeveloper/showapi/gui/ShowCueGUI.java
+++ b/src/main/java/nl/sbdeveloper/showapi/gui/ShowCueGUI.java
@@ -16,7 +16,6 @@ import org.bukkit.entity.Player;
import java.util.ArrayList;
import java.util.Comparator;
import java.util.List;
-import java.util.stream.Collectors;
import static nl.sbdeveloper.showapi.utils.MainUtil.__;
@@ -34,12 +33,11 @@ public class ShowCueGUI extends Inventory {
Pagination pagination = contents.pagination();
List items = new ArrayList<>();
- for (ShowCue cue : Shows.getPoints(showName).stream().sorted(Comparator.comparing(ShowCue::getTime)).collect(Collectors.toList())) {
- items.add(ClickableItem.of(MainUtil.pointToItem(cue), e -> {
- Shows.removePoint(showName, cue);
- open(player, pagination.getPage());
- }));
- }
+ Shows.getPoints(showName).stream().sorted(Comparator.comparing(ShowCue::getTime))
+ .forEach(cue -> items.add(ClickableItem.of(MainUtil.pointToItem(cue), e -> {
+ Shows.removePoint(showName, cue);
+ open(player, pagination.getPage());
+ })));
ClickableItem[] itemsArray = new ClickableItem[items.size()];
itemsArray = items.toArray(itemsArray);
diff --git a/src/main/java/nl/sbdeveloper/showapi/utils/MainUtil.java b/src/main/java/nl/sbdeveloper/showapi/utils/MainUtil.java
index 0baef75..f90cdcf 100644
--- a/src/main/java/nl/sbdeveloper/showapi/utils/MainUtil.java
+++ b/src/main/java/nl/sbdeveloper/showapi/utils/MainUtil.java
@@ -50,7 +50,7 @@ public class MainUtil {
try {
Constructor extends TriggerTask> ctor = type.getTrigger().getConstructor(String[].class);
if (dataSplitter.length < type.getMinArgs()) return null;
- return ctor.newInstance(new Object[] { dataSplitterNew });
+ return ctor.newInstance(dataSplitterNew);
} catch (NoSuchMethodException | IllegalAccessException | InstantiationException | InvocationTargetException e) {
return null;
}