mirror of
https://github.com/dmulloy2/ProtocolLib.git
synced 2025-01-23 08:41:28 +01:00
parent
3f7b7f4bb3
commit
e92abda187
@ -297,9 +297,7 @@ public class ProtocolInjector implements ChannelListener {
|
|||||||
PacketContainer container = new PacketContainer(PacketRegistry.getPacketType(clazz), packet);
|
PacketContainer container = new PacketContainer(PacketRegistry.getPacketType(clazz), packet);
|
||||||
return packetQueued(container, injector.getPlayer(), marker);
|
return packetQueued(container, injector.getPlayer(), marker);
|
||||||
} catch (LinkageError e) {
|
} catch (LinkageError e) {
|
||||||
// So far this has been seen when the jar is shared
|
System.err.println("[ProtocolLib] Encountered a LinkageError (likely a misbehaving wrapper), please report this!");
|
||||||
System.err.println("[ProtocolLib] Encountered a LinkageError. Make sure you\'re not using this jar for multiple server instances!");
|
|
||||||
System.err.println("[ProtocolLib] If you\'re getting this error for other reasons, please report it!");
|
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -47,7 +47,7 @@ public class BukkitCloner implements Cloner {
|
|||||||
if (nmsClass != null) {
|
if (nmsClass != null) {
|
||||||
CLONERS.put(nmsClass, nmsObject -> fromHandle.apply(nmsObject).deepClone().getHandle());
|
CLONERS.put(nmsClass, nmsObject -> fromHandle.apply(nmsObject).deepClone().getHandle());
|
||||||
}
|
}
|
||||||
} catch (RuntimeException ignored) { }
|
} catch (Throwable ignored) { }
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressWarnings({"unchecked", "rawtypes"})
|
@SuppressWarnings({"unchecked", "rawtypes"})
|
||||||
@ -57,7 +57,7 @@ public class BukkitCloner implements Cloner {
|
|||||||
if (nmsClass != null) {
|
if (nmsClass != null) {
|
||||||
CLONERS.put(nmsClass, nmsObject -> converter.getGeneric(converter.getSpecific(nmsObject)));
|
CLONERS.put(nmsClass, nmsObject -> converter.getGeneric(converter.getSpecific(nmsObject)));
|
||||||
}
|
}
|
||||||
} catch (RuntimeException ignored) { }
|
} catch (Throwable ignored) { }
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void fromManual(Supplier<Class<?>> getClass, Function<Object, Object> cloner) {
|
private static void fromManual(Supplier<Class<?>> getClass, Function<Object, Object> cloner) {
|
||||||
@ -66,7 +66,7 @@ public class BukkitCloner implements Cloner {
|
|||||||
if (nmsClass != null) {
|
if (nmsClass != null) {
|
||||||
CLONERS.put(nmsClass, cloner);
|
CLONERS.put(nmsClass, cloner);
|
||||||
}
|
}
|
||||||
} catch (RuntimeException ignored) { }
|
} catch (Throwable ignored) { }
|
||||||
}
|
}
|
||||||
|
|
||||||
static {
|
static {
|
||||||
|
Loading…
Reference in New Issue
Block a user