Skip to content

1.8-pre-3

Pre-release
Pre-release
Compare
Choose a tag to compare
@retrooper retrooper released this 07 Feb 19:05

CHANGELOG

BUG FIXES

  • ClientVersion#isPreRelease bug fix by @terrarier2111
  • Before PacketEvents used to kick users, because it "Failed to inject" them. This would usually occur when users join while the server is starting. We have FIXED this. We will schedule a re-injection a bit later(one second), and with our testing, it seems to work! You are now able to configure the action PacketEvents should do when the re-injection fails(should never be the case, unless there are incompatibilities). By default PacketEvents will kick the user.
    Example of how to modify the action: https://github.com/retrooper/packetevents-example/blob/master/src/main/java/Main.java#L35

NEW FEATURES

  • WrappedPacketOutChat(BaseComponent, UUID) constructor added.

  • WrappedPacketOutNamedSoundEffect wrapper finished(NOT sendable yet).

  • WrappedPacketInBlockPlace#getCursorX, WrappedPacketInBlockPlace#getCursorY, WrappedPacketInBlockPlace#getCursorZ added by @Tecnio
    WARNING: These methods are only supported on 1.7.10 up to 1.8.8 versions of minecraft as newer versions no longer give us this data.

  • WrappedPacketOutPosition finished, new methods added. You can now check if the values in the wrapper are relative or absolute.

  • You can now filter out what packets get called in your packet listener.(NOT SUPPORTED ON LEGACY EVENT SYSTEM/legacy packet listener).
    Doing this might noticeably improve performance of your plugin.
    Learn how to use this new feature by viewing this example: https://github.com/retrooper/packetevents-example/blob/master/src/main/java/Main.java#L69

  • PacketListenerDynamic#onPacketEventExternal added. Since the PacketListenerDynamic has a method for every in-built event. You might ask how can I use a custom event created using the PacketEvents event system. You can use the PacketListenerDynamic#onPacketEventExternal. It is only fired for external events, events that aren't built into the PacketEvents API!

OPTIMIZATIONS

  • WrappedPacketInEntityAction optimized and cleaned up.
  • ClientVersion cleaned up by @terrarier2111

CHANGES

  • Direction enum import changed.
    Direction.OTHER is when the face is equal to 255(check wiki.vg/Protocol for more information)
    Direction.INVALID is when the face is not recognized. The user might be cheating or might be a new protocol change? Not sure?
  • PacketListenerDynamic#onPacketEvent used to be a method called for every single event, allowing you to do "instanceof" checks to use your target event, but this feature is useless due to how little events we have. We removed it to help improve performance, we also realized that barely anyone used this feature.

EXAMPLE USAGE

View packetevents-example source code for 1.8-pre-3