refactor: make field final
This commit is contained in:
parent
ebdcdd34ae
commit
9a921d0b7a
1 changed files with 1 additions and 1 deletions
|
@ -11,7 +11,7 @@ public class InternalsProvider {
|
||||||
try {
|
try {
|
||||||
final String packageName = Internals.class.getPackage().getName();
|
final String packageName = Internals.class.getPackage().getName();
|
||||||
final String bukkitVersion = Bukkit.getServer().getClass().getPackage().getName().split("\\.")[3];
|
final String bukkitVersion = Bukkit.getServer().getClass().getPackage().getName().split("\\.")[3];
|
||||||
String fullClassName = packageName + "." + bukkitVersion;
|
final String fullClassName = packageName + "." + bukkitVersion;
|
||||||
internals = (Internals) Class.forName(fullClassName).getConstructors()[0].newInstance();
|
internals = (Internals) Class.forName(fullClassName).getConstructors()[0].newInstance();
|
||||||
} catch (InvocationTargetException | ClassNotFoundException | InstantiationException | IllegalAccessException |
|
} catch (InvocationTargetException | ClassNotFoundException | InstantiationException | IllegalAccessException |
|
||||||
ClassCastException exception) {
|
ClassCastException exception) {
|
||||||
|
|
Loading…
Reference in a new issue