55import org .powernukkitx .plugin .PluginBase ;
66import org .powernukkitx .placeholderapi .command .PlaceholderCommand ;
77import org .powernukkitx .placeholderapi .placeholder .Placeholder ;
8+ import org .powernukkitx .utils .Utils ;
89
910import java .text .SimpleDateFormat ;
1011import java .util .Date ;
@@ -81,7 +82,7 @@ private void registerDefaults() {
8182 this .register ("player_offhand" , (player , params ) -> player .getInventory ().getItemInOffhand ().getName ());
8283 this .register ("player_exp" , (player , params ) -> String .valueOf (player .getExperience ()));
8384 this .register ("player_exp_level" , (player , params ) -> String .valueOf (player .getExperienceLevel ()));
84- this .register ("player_platform" , (player , params ) -> player .getClientChainData ().getDeviceOS ().name ( ));
85+ this .register ("player_platform" , (player , params ) -> Utils . mapDeviceOSToString ( player .getClientChainData ().getDeviceOS ().getId () ));
8586 this .register ("level_tps" , (player , params ) -> String .valueOf (player .getLevel ().getBaseTickGameLoop ().getTps ()));
8687 this .register ("server_online" , (player , params ) -> String .valueOf (getServer ().getOnlinePlayers ().size ()));
8788 this .register ("server_max_players" , (player , params ) -> String .valueOf (getServer ().getMaxPlayers ()));
@@ -93,9 +94,9 @@ private void registerDefaults() {
9394 this .register ("server_git" , (player , params ) -> getServer ().getGitCommit ());
9495 this .register ("server_version" , (player , params ) -> getServer ().getVersion ());
9596 this .register ("server_protocol" , (player , params ) -> String .valueOf (NetworkConstants .CODEC .getProtocolVersion ()));
96- this .register ("player_pos" , (p , arg ) -> {
97- if (arg .length == 0 ) return p .getFloorX () + " " + p .getFloorY () + " " + p .getFloorZ ();
98- return switch (arg [0 ]) {
97+ this .register ("player_pos" , (p , params ) -> {
98+ if (params .length == 0 ) return p .getFloorX () + " " + p .getFloorY () + " " + p .getFloorZ ();
99+ return switch (params [0 ]) {
99100 case "x" -> String .valueOf (p .getFloorX ());
100101 case "y" -> String .valueOf (p .getFloorY ());
101102 case "z" -> String .valueOf (p .getFloorZ ());
0 commit comments