Mirror von
https://github.com/ViaVersion/ViaVersion.git
synchronisiert 2024-11-20 06:50:08 +01:00
Merge branch 'master' into dev
Dieser Commit ist enthalten in:
Commit
628979f923
@ -31,15 +31,12 @@ public class BukkitDecodeHandler extends ByteToMessageDecoder {
|
|||||||
throw CancelDecoderException.generate(null);
|
throw CancelDecoderException.generate(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
ByteBuf transformedBuf = null;
|
|
||||||
try {
|
|
||||||
if (info.shouldTransformPacket()) {
|
if (info.shouldTransformPacket()) {
|
||||||
transformedBuf = ctx.alloc().buffer().writeBytes(bytebuf);
|
info.transformIncoming(bytebuf, CancelDecoderException::generate);
|
||||||
info.transformIncoming(transformedBuf, CancelDecoderException::generate);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
list.addAll(PipelineUtil.callDecode(this.minecraftDecoder, ctx, transformedBuf == null ? bytebuf : transformedBuf));
|
list.addAll(PipelineUtil.callDecode(this.minecraftDecoder, ctx, bytebuf));
|
||||||
} catch (InvocationTargetException e) {
|
} catch (InvocationTargetException e) {
|
||||||
if (e.getCause() instanceof Exception) {
|
if (e.getCause() instanceof Exception) {
|
||||||
throw (Exception) e.getCause();
|
throw (Exception) e.getCause();
|
||||||
@ -47,11 +44,6 @@ public class BukkitDecodeHandler extends ByteToMessageDecoder {
|
|||||||
throw (Error) e.getCause();
|
throw (Error) e.getCause();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} finally {
|
|
||||||
if (transformedBuf != null) {
|
|
||||||
transformedBuf.release();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -72,7 +72,7 @@ public class BukkitInventoryQuickMoveProvider extends InventoryQuickMoveProvider
|
|||||||
// http://wiki.vg/index.php?title=Protocol&oldid=13223#Click_Window
|
// http://wiki.vg/index.php?title=Protocol&oldid=13223#Click_Window
|
||||||
updateTask.addItem(windowId, slotId, actionId);
|
updateTask.addItem(windowId, slotId, actionId);
|
||||||
if (!registered && Via.getPlatform().isPluginEnabled()) {
|
if (!registered && Via.getPlatform().isPluginEnabled()) {
|
||||||
Via.getPlatform().runSync(updateTask, 5L);
|
Via.getPlatform().runSync(updateTask);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -17,12 +17,12 @@ public class DisplayLeaksSubCmd extends ViaSubCommand {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean execute(ViaCommandSender sender, String[] args) {
|
public boolean execute(ViaCommandSender sender, String[] args) {
|
||||||
if (ResourceLeakDetector.getLevel() != ResourceLeakDetector.Level.ADVANCED)
|
if (ResourceLeakDetector.getLevel() != ResourceLeakDetector.Level.PARANOID)
|
||||||
ResourceLeakDetector.setLevel(ResourceLeakDetector.Level.ADVANCED);
|
ResourceLeakDetector.setLevel(ResourceLeakDetector.Level.PARANOID);
|
||||||
else
|
else
|
||||||
ResourceLeakDetector.setLevel(ResourceLeakDetector.Level.DISABLED);
|
ResourceLeakDetector.setLevel(ResourceLeakDetector.Level.DISABLED);
|
||||||
|
|
||||||
sendMessage(sender, "&6Leak detector is now %s", (ResourceLeakDetector.getLevel() == ResourceLeakDetector.Level.ADVANCED ? "&aenabled" : "&cdisabled"));
|
sendMessage(sender, "&6Leak detector is now %s", (ResourceLeakDetector.getLevel() == ResourceLeakDetector.Level.PARANOID ? "&aenabled" : "&cdisabled"));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -28,15 +28,12 @@ public class SpongeDecodeHandler extends ByteToMessageDecoder {
|
|||||||
throw CancelDecoderException.generate(null);
|
throw CancelDecoderException.generate(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
ByteBuf transformedBuf = null;
|
|
||||||
try {
|
|
||||||
if (info.shouldTransformPacket()) {
|
if (info.shouldTransformPacket()) {
|
||||||
transformedBuf = ctx.alloc().buffer().writeBytes(bytebuf);
|
info.transformIncoming(bytebuf, CancelDecoderException::generate);
|
||||||
info.transformIncoming(transformedBuf, CancelDecoderException::generate);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
list.addAll(PipelineUtil.callDecode(this.minecraftDecoder, ctx, transformedBuf == null ? bytebuf : transformedBuf));
|
list.addAll(PipelineUtil.callDecode(this.minecraftDecoder, ctx, bytebuf));
|
||||||
} catch (InvocationTargetException e) {
|
} catch (InvocationTargetException e) {
|
||||||
if (e.getCause() instanceof Exception) {
|
if (e.getCause() instanceof Exception) {
|
||||||
throw (Exception) e.getCause();
|
throw (Exception) e.getCause();
|
||||||
@ -44,11 +41,6 @@ public class SpongeDecodeHandler extends ByteToMessageDecoder {
|
|||||||
throw (Error) e.getCause();
|
throw (Error) e.getCause();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} finally {
|
|
||||||
if (transformedBuf != null) {
|
|
||||||
transformedBuf.release();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren