diff --git a/Essentials/src/com/earth2me/essentials/UserMap.java b/Essentials/src/com/earth2me/essentials/UserMap.java index 50768644d..9ebb67daa 100644 --- a/Essentials/src/com/earth2me/essentials/UserMap.java +++ b/Essentials/src/com/earth2me/essentials/UserMap.java @@ -289,6 +289,7 @@ public class UserMap extends CacheLoader implements IConf { private void legacyMaximumSize(CacheBuilder builder, int maxCount) { try { Method maxSizeLegacy = builder.getClass().getDeclaredMethod("maximumSize", Integer.TYPE); + maxSizeLegacy.setAccessible(true); maxSizeLegacy.invoke(builder, maxCount); } catch (NoSuchMethodException | InvocationTargetException | IllegalAccessException e) { e.printStackTrace(); @@ -307,6 +308,7 @@ public class UserMap extends CacheLoader implements IConf { Cache legacyUsers; try { assert build != null; + build.setAccessible(true); legacyUsers = (Cache) build.invoke(builder, this); } catch (IllegalAccessException | InvocationTargetException e) { legacyUsers = null;