mirror of
https://github.com/songoda/FabledSkyBlock.git
synced 2024-09-03 18:40:35 +02:00
Fixed improper d field reflection in WorldBorder SD-3861
This commit is contained in:
parent
56c1bf509d
commit
0b20a3669a
|
@ -44,11 +44,7 @@ public final class WorldBorder {
|
|||
|
||||
Object worldBorder = worldBorderClass.getConstructor().newInstance();
|
||||
|
||||
if (NMSUtil.getVersionNumber() < 9) {
|
||||
Field borderSize = worldBorder.getClass().getDeclaredField("d");
|
||||
borderSize.setAccessible(true);
|
||||
borderSize.set(worldBorder, size);
|
||||
} else {
|
||||
if (NMSUtil.getVersionNumber() >= 9) {
|
||||
Object craftWorld = craftWorldClass.cast(centerLocation.getWorld());
|
||||
Method getHandleMethod = craftWorld.getClass().getMethod("getHandle");
|
||||
Object worldServer = getHandleMethod.invoke(craftWorld);
|
||||
|
|
Loading…
Reference in New Issue
Block a user