Skip to content

Commit

Permalink
1.6.7 release
Browse files Browse the repository at this point in the history
* TODO for 1.6.8:
- WrappedPacketOutCustomPayload should be finished
- WrappedPacketOutEntityMetadata should be made

Both wrappers are planned to support sending to players.
  • Loading branch information
retrooper committed Sep 10, 2020
1 parent 51a58f7 commit 8c3726c
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 169 deletions.
134 changes: 0 additions & 134 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -115,139 +115,5 @@
<version>1.8.8-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>

<dependency>
<groupId>org.bukkit</groupId>
<artifactId>bukkit</artifactId>
<version>1.8.8-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>

<dependency>
<groupId>org.github.spigot</groupId>
<artifactId>1.14.1</artifactId>
<version>1.14.1</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.github.spigot</groupId>
<artifactId>1.15.1</artifactId>
<version>1.15.1</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.github.spigot</groupId>
<artifactId>1.14.3</artifactId>
<version>1.14.3</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.github.spigot</groupId>
<artifactId>1.14.2</artifactId>
<version>1.14.2</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.github.spigot</groupId>
<artifactId>1.15</artifactId>
<version>1.15</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.github.spigot</groupId>
<artifactId>1.15.2</artifactId>
<version>1.15.2</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.github.spigot</groupId>
<artifactId>1.13.2</artifactId>
<version>1.13.2</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.github.spigot</groupId>
<artifactId>1.7.10</artifactId>
<version>1.7.10</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.github.spigot</groupId>
<artifactId>1.8</artifactId>
<version>1.8</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.github.spigot</groupId>
<artifactId>1.8.3</artifactId>
<version>1.8.3</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.github.spigot</groupId>
<artifactId>1.8.8</artifactId>
<version>1.8.8</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.github.spigot</groupId>
<artifactId>1.16.1</artifactId>
<version>1.16.1</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.github.spigot</groupId>
<artifactId>1.9</artifactId>
<version>1.9</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.github.spigot</groupId>
<artifactId>1.9.4</artifactId>
<version>1.9.4</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.github.spigot</groupId>
<artifactId>1.10.2</artifactId>
<version>1.10.2</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.github.spigot</groupId>
<artifactId>1.11.1</artifactId>
<version>1.11.1</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.github.spigot</groupId>
<artifactId>1.11.2</artifactId>
<version>1.11.2</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.github.spigot</groupId>
<artifactId>1.12.1</artifactId>
<version>1.12.1</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.github.spigot</groupId>
<artifactId>1.12.2</artifactId>
<version>1.12.2</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.github.spigot</groupId>
<artifactId>1.13</artifactId>
<version>1.13</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.github.spigot</groupId>
<artifactId>1.14</artifactId>
<version>1.14</version>
<scope>provided</scope>
</dependency>
</dependencies>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,7 @@
package io.github.retrooper.packetevents.example;

import io.github.retrooper.packetevents.PacketEvents;
import io.github.retrooper.packetevents.annotations.PacketHandler;
import io.github.retrooper.packetevents.enums.PacketEventPriority;
import io.github.retrooper.packetevents.event.PacketListener;
import io.github.retrooper.packetevents.event.impl.PacketReceiveEvent;
import io.github.retrooper.packetevents.event.impl.PacketSendEvent;
import io.github.retrooper.packetevents.packet.PacketType;
import io.github.retrooper.packetevents.packetwrappers.in.chat.WrappedPacketInChat;
import io.github.retrooper.packetevents.packetwrappers.in.useentity.WrappedPacketInUseEntity;
import io.github.retrooper.packetevents.packetwrappers.out.custompayload.WrappedPacketOutCustomPayload;
import org.bukkit.plugin.java.JavaPlugin;

public class MainExample extends JavaPlugin implements PacketListener {
Expand All @@ -56,27 +48,4 @@ public void onEnable() {
public void onDisable() {
PacketEvents.stop();
}

@PacketHandler(priority = PacketEventPriority.MONITOR)
public void onReceive1(PacketReceiveEvent e) {
if(e.getPacketId() == PacketType.Client.USE_ENTITY) {
WrappedPacketInUseEntity ue = new WrappedPacketInUseEntity(e.getNMSPacket());
e.cancel();
}
}

@PacketHandler(priority = PacketEventPriority.NORMAL)
public void onReceive2(PacketReceiveEvent e) {
if(e.getPacketId() == PacketType.Client.USE_ENTITY) {
WrappedPacketInUseEntity ue = new WrappedPacketInUseEntity(e.getNMSPacket());
e.uncancel();
}
}

@PacketHandler
public void onSend(PacketSendEvent e) {
if(e.getPacketId() == PacketType.Server.CUSTOM_PAYLOAD) {

}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@
import io.github.retrooper.packetevents.packetwrappers.out.abilities.WrappedPacketOutAbilities;
import io.github.retrooper.packetevents.packetwrappers.out.animation.WrappedPacketOutAnimation;
import io.github.retrooper.packetevents.packetwrappers.out.chat.WrappedPacketOutChat;
import io.github.retrooper.packetevents.packetwrappers.out.custompayload.WrappedPacketOutCustomPayload;
import io.github.retrooper.packetevents.packetwrappers.out.entity.WrappedPacketOutEntity;
import io.github.retrooper.packetevents.packetwrappers.out.entityvelocity.WrappedPacketOutEntityVelocity;
import io.github.retrooper.packetevents.packetwrappers.out.keepalive.WrappedPacketOutKeepAlive;
Expand Down Expand Up @@ -113,7 +112,7 @@ public static void loadAllWrappers() {
WrappedPacketOutPosition.load();
WrappedPacketOutTransaction.load();
WrappedPacketOutUpdateHealth.load();
WrappedPacketOutCustomPayload.load();
//WrappedPacketOutCustomPayload.load();
}

protected void setup() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@
import java.lang.reflect.Constructor;
import java.lang.reflect.InvocationTargetException;

public class WrappedPacketOutCustomPayload extends WrappedPacket implements SendableWrapper {
class WrappedPacketOutCustomPayload extends WrappedPacket implements SendableWrapper {
//TODO load the outcustompayload wrapper

private static Class<?> packetClass;
private static Constructor<?> constructor;
private static Constructor<?> packetDataSerializerConstructor;
Expand Down Expand Up @@ -154,7 +156,6 @@ public Object asNMSPacket() {
try {
Object minecraftKey = minecraftKeyConstructor.newInstance(tag);
Object dataSerializer = packetDataSerializerConstructor.newInstance(byteBufObject);
;
return constructor.newInstance(minecraftKey, dataSerializer);
} catch (InstantiationException | InvocationTargetException | IllegalAccessException e) {
e.printStackTrace();
Expand Down

0 comments on commit 8c3726c

Please sign in to comment.