mirror of
https://github.com/PlayPro/CoreProtect.git
synced 2024-12-15 05:01:53 +08:00
Fixed all firework metadata not being correctly logged
This commit is contained in:
parent
42c6deff8a
commit
596a39c965
@ -1836,8 +1836,10 @@ public class Rollback extends Queue {
|
|||||||
if (itemCount == 1) {
|
if (itemCount == 1) {
|
||||||
effectBuilder = FireworkEffect.builder();
|
effectBuilder = FireworkEffect.builder();
|
||||||
for (Map<String, Object> fireworkData : map) {
|
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 hasFlicker = (Boolean) fireworkData.get("flicker");
|
||||||
boolean hasTrail = (Boolean) fireworkData.get("trail");
|
boolean hasTrail = (Boolean) fireworkData.get("trail");
|
||||||
|
effectBuilder.with(type);
|
||||||
effectBuilder.flicker(hasFlicker);
|
effectBuilder.flicker(hasFlicker);
|
||||||
effectBuilder.trail(hasTrail);
|
effectBuilder.trail(hasTrail);
|
||||||
}
|
}
|
||||||
|
@ -279,6 +279,7 @@ public class ItemMetaHandler {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Map<String, Object> hasCheck = new HashMap<>();
|
Map<String, Object> hasCheck = new HashMap<>();
|
||||||
|
hasCheck.put("type", effect.getType());
|
||||||
hasCheck.put("flicker", effect.hasFlicker());
|
hasCheck.put("flicker", effect.hasFlicker());
|
||||||
hasCheck.put("trail", effect.hasTrail());
|
hasCheck.put("trail", effect.hasTrail());
|
||||||
list.add(hasCheck);
|
list.add(hasCheck);
|
||||||
|
Loading…
Reference in New Issue
Block a user