SpigotMapper extends Mapper<CommandSender, CommandListenerWrapper> { @Override protected @Nullable SuggestionProvider<CommandListenerWrapper> suggestions(ArgumentCommandNode<CommandSender, ?> command) { var type = command.getType(); var suggestor = command.getCustomSuggestions(); if (!(type instanceof Type<?>) && suggestor == null) { return null; } else if (suggestor == null) { return reparse((Type<?>) type); } var client = CLIENT_SIDE.get(suggestor); if (client != null) { return client; } else { return reparse(suggestor); } } SpigotMapper(CommandDispatcher<CommandSender> dispatcher);   }
@Test void suggestions_primitive_empty() { assertNull(mapper.suggestions(Argument.of("a", PlayerType.WORD).build())); }
@Test void suggestions_clientside() { assertSame(SpigotMapper.CLIENT_SIDE.get(ClientSuggestionProvider.ENTITIES), mapper.suggestions(Argument.of("a", PlayerType.WORD).suggests(ClientSuggestionProvider.ENTITIES).build())); }