Mirror von
https://github.com/ViaVersion/ViaVersion.git
synchronisiert 2024-11-03 14:50:30 +01:00
Fix getHandItem across reloads, though half the things will still break on reload :(
Dieser Commit ist enthalten in:
Ursprung
369710333c
Commit
ef6214a442
@ -47,6 +47,7 @@ public class ViaVersionPlugin extends JavaPlugin implements ViaVersionAPI {
|
|||||||
ViaVersion.setInstance(this);
|
ViaVersion.setInstance(this);
|
||||||
if (System.getProperty("ViaVersion") != null) {
|
if (System.getProperty("ViaVersion") != null) {
|
||||||
getLogger().severe("ViaVersion is already loaded, we don't support reloads. Please reboot if you wish to update.");
|
getLogger().severe("ViaVersion is already loaded, we don't support reloads. Please reboot if you wish to update.");
|
||||||
|
getLogger().severe("Some features may not work.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -166,7 +167,7 @@ public class ViaVersionPlugin extends JavaPlugin implements ViaVersionAPI {
|
|||||||
|
|
||||||
public static ItemStack getHandItem(final ConnectionInfo info) {
|
public static ItemStack getHandItem(final ConnectionInfo info) {
|
||||||
try {
|
try {
|
||||||
return Bukkit.getScheduler().callSyncMethod(getPlugin(ViaVersionPlugin.class), new Callable<ItemStack>() {
|
return Bukkit.getScheduler().callSyncMethod(Bukkit.getPluginManager().getPlugin("ViaVersion"), new Callable<ItemStack>() {
|
||||||
@Override
|
@Override
|
||||||
public ItemStack call() throws Exception {
|
public ItemStack call() throws Exception {
|
||||||
if (info.getPlayer() != null) {
|
if (info.getPlayer() != null) {
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren