From 7a3e75cd84b300b5842920a581649605683fa925 Mon Sep 17 00:00:00 2001 From: ThisTestUser Date: Tue, 24 Sep 2024 16:38:43 +0000 Subject: [PATCH] Fix groupsSpawned setting --- .../solarrabbit/largeraids/versioned/nms/RaidWrapper.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/solarrabbit/largeraids/versioned/nms/RaidWrapper.java b/src/main/java/com/solarrabbit/largeraids/versioned/nms/RaidWrapper.java index cac35c3..f6669e0 100644 --- a/src/main/java/com/solarrabbit/largeraids/versioned/nms/RaidWrapper.java +++ b/src/main/java/com/solarrabbit/largeraids/versioned/nms/RaidWrapper.java @@ -58,7 +58,11 @@ public int getGroupsSpawned() { @Override public void setGroupsSpawned(int groupsSpawned) { try { - FieldUtils.writeField(this.raid, "J", groupsSpawned, true); + try { + FieldUtils.writeField(this.raid, "groupsSpawned", groupsSpawned, true); + } catch (IllegalArgumentException ignore) { + FieldUtils.writeField(this.raid, "J", groupsSpawned, true); + } } catch (IllegalAccessException e) { e.printStackTrace(); }