Fixed all firework metadata not being correctly logged

This commit is contained in:
Intelli 2022-02-25 19:34:23 -07:00
parent 42c6deff8a
commit 596a39c965
2 changed files with 3 additions and 0 deletions

View File

@ -1836,8 +1836,10 @@ public class Rollback extends Queue {
if (itemCount == 1) {
effectBuilder = FireworkEffect.builder();
for (Map<String, Object> fireworkData : map) {
org.bukkit.FireworkEffect.Type type = (org.bukkit.FireworkEffect.Type) fireworkData.getOrDefault("type", org.bukkit.FireworkEffect.Type.BALL);
boolean hasFlicker = (Boolean) fireworkData.get("flicker");
boolean hasTrail = (Boolean) fireworkData.get("trail");
effectBuilder.with(type);
effectBuilder.flicker(hasFlicker);
effectBuilder.trail(hasTrail);
}

View File

@ -279,6 +279,7 @@ public class ItemMetaHandler {
}
Map<String, Object> hasCheck = new HashMap<>();
hasCheck.put("type", effect.getType());
hasCheck.put("flicker", effect.hasFlicker());
hasCheck.put("trail", effect.hasTrail());
list.add(hasCheck);