@@ -67,7 +67,7 @@ public static void register(CommandDispatcher<CommandSourceStack> dispatcher) {
67
67
.executes (context -> listHomesFor (context .getSource (), StringArgumentType .getString (context , "player" )))
68
68
.then (Commands .argument ("name" , StringArgumentType .greedyString ())
69
69
.requires (source -> source .hasPermission (2 ))
70
- .suggests ((context , builder ) -> SharedSuggestionProvider .suggest (getOfflineHomeSuggestions (context . getSource (). getPlayerOrException (), StringArgumentType .getString (context , "player" )), builder ))
70
+ .suggests ((context , builder ) -> SharedSuggestionProvider .suggest (getOfflineHomeSuggestions (StringArgumentType .getString (context , "player" )), builder ))
71
71
.executes (context -> homeFor (context .getSource ().getPlayerOrException (), StringArgumentType .getString (context , "player" ), StringArgumentType .getString (context , "name" )))
72
72
)
73
73
)
@@ -219,10 +219,9 @@ private static int homeFor(ServerPlayer player, String offlineName, String homeN
219
219
return data .homeTeleporter .teleport (player , p -> pos ).runCommand (player );
220
220
}
221
221
222
- private static Set <String > getOfflineHomeSuggestions (ServerPlayer serverPlayer , String offlineName ) {
222
+ private static Set <String > getOfflineHomeSuggestions (String offlineName ) {
223
223
UUID uuid = getOfflineUUIDByName (offlineName );
224
224
if (uuid == null ) {
225
- serverPlayer .displayClientMessage (new TextComponent ("No player with name " + offlineName + " found!" ), false );
226
225
return Collections .emptySet ();
227
226
}
228
227
FTBEPlayerData data = getOfflinePlayerData (uuid );
0 commit comments