Skip to content

Commit e6e41ea

Browse files
committed
feat: player mode
1 parent 8d302cc commit e6e41ea

2 files changed

Lines changed: 9 additions & 1 deletion

File tree

‎src/main/java/com/mcdiamondfire/modapi/MessageRegistry.java‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
import com.mcdiamondfire.modapi.messages.clientbound.server.S2CHandshakeResponse;
88
import com.mcdiamondfire.modapi.messages.clientbound.server.S2CPlayerInfo;
99
import com.mcdiamondfire.modapi.messages.clientbound.server.S2CServerBooster;
10+
import com.mcdiamondfire.modapi.messages.serverbound.player.C2SPlayerMode;
1011
import com.mcdiamondfire.modapi.messages.serverbound.player.C2SPlayerTeleport;
1112
import com.mcdiamondfire.modapi.messages.serverbound.plot.C2SCodeOperation;
1213
import com.mcdiamondfire.modapi.messages.serverbound.plot.C2SMultiCodeOperations;
@@ -49,14 +50,15 @@ public final class MessageRegistry {
4950
// Server-bound.
5051

5152
// Server.
52-
registerMessage(C2SHandshakeRequest.class, "mc2s_handshake_request");
53+
registerMessage(C2SHandshakeRequest.class, "c2s_handshake_request");
5354

5455
// Plot.
5556
registerMessage(C2SCodeOperation.class, "c2s_code_operation");
5657
registerMessage(C2SMultiCodeOperations.class, "c2s_multi_code_operations");
5758

5859
// Player.
5960
registerMessage(C2SPlayerTeleport.class, "c2s_player_teleport");
61+
registerMessage(C2SPlayerMode.class, "c2s_player_mode");
6062

6163
}
6264

‎src/main/proto/serverbound/serverbound_player.proto‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,9 @@ option java_multiple_files = true;
99
message C2SPlayerTeleport {
1010
APILocation location = 1;
1111
}
12+
13+
// Switches a player's mode,
14+
// the player must have the permission to do so.
15+
message C2SPlayerMode {
16+
PlayerMode mode = 1;
17+
}

0 commit comments

Comments
 (0)