Skip to content

Commit 90f3619

Browse files
committed
Add plugin caller to setPacket warning
Fixes #201
1 parent e542f3c commit 90f3619

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

modules/API/src/main/java/com/comphenix/protocol/events/PacketEvent.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
import com.comphenix.protocol.PacketType;
3131
import com.comphenix.protocol.ProtocolLibrary;
3232
import com.comphenix.protocol.async.AsyncMarker;
33+
import com.comphenix.protocol.error.PluginContext;
3334
import com.comphenix.protocol.error.Report;
3435
import com.comphenix.protocol.error.ReportType;
3536
import com.google.common.base.Objects;
@@ -231,7 +232,7 @@ public void setPacket(PacketContainer packet) {
231232
if (CHANGE_WARNINGS.put(oldType, newType)) {
232233
ProtocolLibrary.getErrorReporter().reportWarning(this,
233234
Report.newBuilder(REPORT_CHANGING_PACKET_TYPE_IS_CONFUSING).
234-
messageParam(oldType, newType).
235+
messageParam(PluginContext.getPluginCaller(new Exception()), oldType, newType).
235236
build());
236237
}
237238
}

0 commit comments

Comments
 (0)