Skip to content

Commit 82ab803

Browse files
author
lukas81298
committed
updated javadocs and fixed bundle wrapper
1 parent 68cdd1c commit 82ab803

16 files changed

+145
-4
lines changed

src/main/java/com/comphenix/packetwrapper/wrappers/AbstractPacket.java

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,4 +92,19 @@ public void broadcastPacket() {
9292
public void receivePacket(Player sender) {
9393
ProtocolLibrary.getProtocolManager().receiveClientPacket(sender, getHandle());
9494
}
95+
96+
@Override
97+
public boolean equals(Object o) {
98+
if (this == o) return true;
99+
if (o == null || getClass() != o.getClass()) return false;
100+
101+
AbstractPacket that = (AbstractPacket) o;
102+
103+
return java.util.Objects.equals(handle, that.handle);
104+
}
105+
106+
@Override
107+
public int hashCode() {
108+
return handle != null ? handle.hashCode() : 0;
109+
}
95110
}

src/main/java/com/comphenix/packetwrapper/wrappers/play/clientbound/WrapperPlayServerAbilities.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ public WrapperPlayServerAbilities() {
1515
super(TYPE);
1616
}
1717

18+
/**
19+
* Constructors a new wrapper for the specified packet
20+
* @param packet the packet to wrap
21+
*/
1822
public WrapperPlayServerAbilities(PacketContainer packet) {
1923
super(packet, TYPE);
2024
}

src/main/java/com/comphenix/packetwrapper/wrappers/play/clientbound/WrapperPlayServerAdvancements.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@ public WrapperPlayServerAdvancements() {
2020
super(TYPE);
2121
}
2222

23+
/**
24+
* Constructors a new wrapper for the specified packet
25+
* @param packet the packet to wrap
26+
*/
2327
public WrapperPlayServerAdvancements(PacketContainer packet) {
2428
super(packet, TYPE);
2529
}

src/main/java/com/comphenix/packetwrapper/wrappers/play/clientbound/WrapperPlayServerAnimation.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@ public WrapperPlayServerAnimation() {
2020
super(TYPE);
2121
}
2222

23+
/**
24+
* Constructors a new wrapper for the specified packet
25+
* @param packet the packet to wrap
26+
*/
2327
public WrapperPlayServerAnimation(PacketContainer packet) {
2428
super(packet, TYPE);
2529
}

src/main/java/com/comphenix/packetwrapper/wrappers/play/clientbound/WrapperPlayServerAttachEntity.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ public WrapperPlayServerAttachEntity() {
1515
super(TYPE);
1616
}
1717

18+
/**
19+
* Constructors a new wrapper for the specified packet
20+
* @param packet the packet to wrap
21+
*/
1822
public WrapperPlayServerAttachEntity(PacketContainer packet) {
1923
super(packet, TYPE);
2024
}

src/main/java/com/comphenix/packetwrapper/wrappers/play/clientbound/WrapperPlayServerAutoRecipe.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ public WrapperPlayServerAutoRecipe() {
1616
super(TYPE);
1717
}
1818

19+
/**
20+
* Constructors a new wrapper for the specified packet
21+
* @param packet the packet to wrap
22+
*/
1923
public WrapperPlayServerAutoRecipe(PacketContainer packet) {
2024
super(packet, TYPE);
2125
}

src/main/java/com/comphenix/packetwrapper/wrappers/play/clientbound/WrapperPlayServerBlockAction.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@ public WrapperPlayServerBlockAction() {
2222
super(TYPE);
2323
}
2424

25+
/**
26+
* Constructors a new wrapper for the specified packet
27+
* @param packet the packet to wrap
28+
*/
2529
public WrapperPlayServerBlockAction(PacketContainer packet) {
2630
super(packet, TYPE);
2731
}

src/main/java/com/comphenix/packetwrapper/wrappers/play/clientbound/WrapperPlayServerBlockBreakAnimation.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ public WrapperPlayServerBlockBreakAnimation() {
1919
super(TYPE);
2020
}
2121

22+
/**
23+
* Constructors a new wrapper for the specified packet
24+
* @param packet the packet to wrap
25+
*/
2226
public WrapperPlayServerBlockBreakAnimation(PacketContainer packet) {
2327
super(packet, TYPE);
2428
}

src/main/java/com/comphenix/packetwrapper/wrappers/play/clientbound/WrapperPlayServerBlockChange.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@ public WrapperPlayServerBlockChange() {
2020
super(TYPE);
2121
}
2222

23+
/**
24+
* Constructors a new wrapper for the specified packet
25+
* @param packet the packet to wrap
26+
*/
2327
public WrapperPlayServerBlockChange(PacketContainer packet) {
2428
super(packet, TYPE);
2529
}

src/main/java/com/comphenix/packetwrapper/wrappers/play/clientbound/WrapperPlayServerBlockChangedAck.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ public WrapperPlayServerBlockChangedAck() {
1818
super(TYPE);
1919
}
2020

21+
/**
22+
* Constructors a new wrapper for the specified packet
23+
* @param packet the packet to wrap
24+
*/
2125
public WrapperPlayServerBlockChangedAck(PacketContainer packet) {
2226
super(packet, TYPE);
2327
}

0 commit comments

Comments
 (0)