File tree Expand file tree Collapse file tree 1 file changed +6
-10
lines changed
common/src/main/kotlin/com/lambda/module/modules/player Expand file tree Collapse file tree 1 file changed +6
-10
lines changed Original file line number Diff line number Diff line change @@ -14,18 +14,14 @@ object AutoReply : Module(
1414 defaultTags = setOf(ModuleTag .PLAYER )
1515){
1616 init {
17- listener<PacketEvent .Receive .Post >{ event ->
18- val packet = event.packet;
17+ listener<PacketEvent .Receive .Pre >{ event ->
18+ val packet = event.packet
1919 if (packet !is GameMessageS2CPacket ) return @listener
20- if ( ! packet.content.string.contains( " Coords " , true )) return @listener
21- if (! packet.content.string. contains(" whispers: " , true )) return @listener
22- var msg = packet.content.string
20+ val msg = packet.content.string
21+ if (! msg. contains(" Coords " , true )) return @listener
22+ if ( ! msg.contains( " whispers: " )) return @listener
2323 val sender = msg.split(" whispers: " ).first()
24- connection.sendChatCommand(" w $sender ${player.pos.string} [${world.dimension.toString()} ]" )
25-
26-
27-
24+ connection.sendChatCommand(" w $sender ${player.pos.string} [${world.dimension} ]" )
2825 }
2926 }
30-
3127}
You can’t perform that action at this time.
0 commit comments