File tree Expand file tree Collapse file tree 2 files changed +5
-145
lines changed
common/src/main/java/io/github/communityradargg/forgemod/command
versions/1.12.2/src/main/java/io/github/communityradargg/forgemod/command Expand file tree Collapse file tree 2 files changed +5
-145
lines changed Original file line number Diff line number Diff line change 1818import io .github .communityradargg .forgemod .radarlistmanager .RadarListEntry ;
1919import io .github .communityradargg .forgemod .util .CommonHandler ;
2020import io .github .communityradargg .forgemod .util .Messages ;
21+ import io .github .communityradargg .forgemod .util .PlayerInfo ;
2122import io .github .communityradargg .forgemod .util .RadarMessage ;
22- import net .minecraft .client .Minecraft ;
23- import net .minecraft .client .network .NetworkPlayerInfo ;
24- import org .jetbrains .annotations .NotNull ;
2523import java .util .Optional ;
24+ import org .jetbrains .annotations .NotNull ;
2625
2726/**
2827 * Holds the logic of the check subcommand.
@@ -99,13 +98,13 @@ private void handleCheckPlayerSubcommand(final @NotNull String[] args) {
9998 */
10099 private void handleCheckAllSubcommand () {
101100 boolean anyPlayerFound = false ;
102- for (final NetworkPlayerInfo networkPlayer : Minecraft . getMinecraft (). getNetHandler (). getPlayerInfoMap ()) {
103- if (networkPlayer . getGameProfile (). getId () == null ) {
101+ for (final PlayerInfo playerInfo : commonHandler . getWorldPlayers ()) {
102+ if (playerInfo . getUuid () == null ) {
104103 continue ;
105104 }
106105
107106 final Optional <RadarListEntry > listEntryOptional = commonHandler .getListManager ()
108- .getRadarListEntry (networkPlayer . getGameProfile (). getId ());
107+ .getRadarListEntry (playerInfo . getUuid ());
109108 if (!listEntryOptional .isPresent ()) {
110109 // player uuid is on no list
111110 continue ;
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments