mirror of
https://github.com/LuckPerms/LuckPerms.git
synced 2024-12-28 03:57:36 +01:00
Don't rely on getPackage to determine generated class name (#2937)
This commit is contained in:
parent
e3138eb94c
commit
a17b441165
@ -106,7 +106,8 @@ public class GeneratedEventClass {
|
||||
|
||||
// determine a generated class name of the event
|
||||
String eventClassSuffix = eventClass.getName().substring(LuckPermsEvent.class.getPackage().getName().length());
|
||||
String generatedClassName = GeneratedEventClass.class.getPackage().getName() + eventClassSuffix;
|
||||
String packageWithName = GeneratedEventClass.class.getName();
|
||||
String generatedClassName = packageWithName.substring(0, packageWithName.lastIndexOf('.')) + eventClassSuffix;
|
||||
|
||||
DynamicType.Builder<AbstractEvent> builder = new ByteBuddy(ClassFileVersion.JAVA_V8)
|
||||
// create a subclass of AbstractEvent
|
||||
|
Loading…
Reference in New Issue
Block a user