diff --git a/Common/src/main/java/com/almostreliable/lootjs/kube/LootJSPlugin.java b/Common/src/main/java/com/almostreliable/lootjs/kube/LootJSPlugin.java index 84b5c50..395acf5 100644 --- a/Common/src/main/java/com/almostreliable/lootjs/kube/LootJSPlugin.java +++ b/Common/src/main/java/com/almostreliable/lootjs/kube/LootJSPlugin.java @@ -82,8 +82,13 @@ public void registerBindings(BindingsEvent event) { public void registerTypeWrappers(ScriptType type, TypeWrappers typeWrappers) { typeWrappers.registerSimple(LootEntry.class, LootEntryWrapper::of); typeWrappers.registerSimple(MinMaxBounds.Doubles.class, IntervalJS::ofDoubles); - typeWrappers.registerSimple(MinMaxBounds.Ints.class, IntervalJS::ofInt); - + + try { + typeWrappers.registerSimple(MinMaxBounds.Ints.class, IntervalJS::ofInt); + } catch (IllegalArgumentException ignored) { + // Wrapper already registered by KubeJS, skip + } + typeWrappers.registerSimple(ItemFilter.class, o -> { if (o instanceof List list) { Map> split = list