Mojang Mappings
This commit is contained in:
@@ -9,16 +9,15 @@ import com.mojang.brigadier.suggestion.SuggestionsBuilder;
|
||||
import io.github.skippyall.minions.minion.MinionData;
|
||||
import io.github.skippyall.minions.minion.MinionPersistentState;
|
||||
import io.github.skippyall.minions.minion.MinionProfileUtils;
|
||||
import net.minecraft.commands.CommandSourceStack;
|
||||
import net.minecraft.network.chat.Component;
|
||||
import net.minecraft.server.MinecraftServer;
|
||||
import net.minecraft.server.command.ServerCommandSource;
|
||||
import net.minecraft.text.Text;
|
||||
|
||||
import java.util.Optional;
|
||||
import java.util.UUID;
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
|
||||
public class MinionArgument {
|
||||
public static final SimpleCommandExceptionType MINION_NOT_PRESENT = new SimpleCommandExceptionType(Text.translatable("minions.command.minion.not_present"));
|
||||
public static final SimpleCommandExceptionType MINION_NOT_PRESENT = new SimpleCommandExceptionType(Component.translatable("minions.command.minion.not_present"));
|
||||
|
||||
public static final MinionSuggestionProvider SUGGESTION_PROVIDER = new MinionSuggestionProvider();
|
||||
|
||||
@@ -38,9 +37,9 @@ public class MinionArgument {
|
||||
return data.get();
|
||||
}
|
||||
|
||||
public static class MinionSuggestionProvider implements SuggestionProvider<ServerCommandSource> {
|
||||
public static class MinionSuggestionProvider implements SuggestionProvider<CommandSourceStack> {
|
||||
@Override
|
||||
public CompletableFuture<Suggestions> getSuggestions(CommandContext<ServerCommandSource> context, SuggestionsBuilder builder) throws CommandSyntaxException {
|
||||
public CompletableFuture<Suggestions> getSuggestions(CommandContext<CommandSourceStack> context, SuggestionsBuilder builder) throws CommandSyntaxException {
|
||||
for (MinionData data : MinionPersistentState.get(context.getSource().getServer()).getMinionDataList()) {
|
||||
builder.suggest(data.name());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user