Renamed project to 'Brigadier'

This commit is contained in:
Nathan Adams
2014-10-02 13:00:29 +02:00
parent 8c5338a6bd
commit ef4199e824
42 changed files with 134 additions and 134 deletions
@@ -0,0 +1,7 @@
package com.mojang.brigadier;
import com.mojang.brigadier.context.CommandContext;
public interface Command {
void run(CommandContext context);
}
@@ -1,12 +1,12 @@
package net.minecraft.commands;
package com.mojang.brigadier;
import net.minecraft.commands.builder.LiteralArgumentBuilder;
import net.minecraft.commands.context.CommandContext;
import net.minecraft.commands.context.CommandContextBuilder;
import net.minecraft.commands.exceptions.CommandException;
import net.minecraft.commands.exceptions.SimpleCommandExceptionType;
import net.minecraft.commands.tree.CommandNode;
import net.minecraft.commands.tree.RootCommandNode;
import com.mojang.brigadier.builder.LiteralArgumentBuilder;
import com.mojang.brigadier.context.CommandContext;
import com.mojang.brigadier.context.CommandContextBuilder;
import com.mojang.brigadier.exceptions.CommandException;
import com.mojang.brigadier.exceptions.SimpleCommandExceptionType;
import com.mojang.brigadier.tree.CommandNode;
import com.mojang.brigadier.tree.RootCommandNode;
public class CommandDispatcher<T> {
public static final SimpleCommandExceptionType ERROR_UNKNOWN_COMMAND = new SimpleCommandExceptionType("unknown_command", "Unknown command");
@@ -0,0 +1,8 @@
package com.mojang.brigadier.arguments;
import com.mojang.brigadier.context.ParsedArgument;
import com.mojang.brigadier.exceptions.CommandException;
public interface CommandArgumentType<T> {
ParsedArgument<T> parse(String command) throws CommandException;
}
@@ -1,11 +1,11 @@
package net.minecraft.commands.arguments;
package com.mojang.brigadier.arguments;
import com.google.common.base.Splitter;
import net.minecraft.commands.CommandDispatcher;
import net.minecraft.commands.context.CommandContext;
import net.minecraft.commands.context.ParsedArgument;
import net.minecraft.commands.exceptions.CommandException;
import net.minecraft.commands.exceptions.ParameterizedCommandExceptionType;
import com.mojang.brigadier.CommandDispatcher;
import com.mojang.brigadier.context.CommandContext;
import com.mojang.brigadier.context.ParsedArgument;
import com.mojang.brigadier.exceptions.CommandException;
import com.mojang.brigadier.exceptions.ParameterizedCommandExceptionType;
public class IntegerArgumentType implements CommandArgumentType<Integer> {
public static final ParameterizedCommandExceptionType ERROR_NOT_A_NUMBER = new ParameterizedCommandExceptionType("argument-integer-invalid", "Expected an integer, found '${found}'", "found");
@@ -1,4 +1,4 @@
@ParametersAreNonnullByDefault
package net.minecraft.commands.context;
package com.mojang.brigadier.arguments;
import javax.annotation.ParametersAreNonnullByDefault;
@@ -1,8 +1,8 @@
package net.minecraft.commands.builder;
package com.mojang.brigadier.builder;
import net.minecraft.commands.Command;
import net.minecraft.commands.tree.CommandNode;
import net.minecraft.commands.tree.RootCommandNode;
import com.mojang.brigadier.Command;
import com.mojang.brigadier.tree.CommandNode;
import com.mojang.brigadier.tree.RootCommandNode;
import java.util.Collection;
@@ -1,7 +1,7 @@
package net.minecraft.commands.builder;
package com.mojang.brigadier.builder;
import net.minecraft.commands.tree.CommandNode;
import net.minecraft.commands.tree.LiteralCommandNode;
import com.mojang.brigadier.tree.CommandNode;
import com.mojang.brigadier.tree.LiteralCommandNode;
public class LiteralArgumentBuilder extends ArgumentBuilder<LiteralArgumentBuilder> {
private final String literal;
@@ -1,8 +1,8 @@
package net.minecraft.commands.builder;
package com.mojang.brigadier.builder;
import net.minecraft.commands.arguments.CommandArgumentType;
import net.minecraft.commands.tree.ArgumentCommandNode;
import net.minecraft.commands.tree.CommandNode;
import com.mojang.brigadier.arguments.CommandArgumentType;
import com.mojang.brigadier.tree.ArgumentCommandNode;
import com.mojang.brigadier.tree.CommandNode;
public class RequiredArgumentBuilder<T> extends ArgumentBuilder<RequiredArgumentBuilder<T>> {
private final String name;
@@ -1,4 +1,4 @@
@ParametersAreNonnullByDefault
package net.minecraft.commands.builder;
package com.mojang.brigadier.builder;
import javax.annotation.ParametersAreNonnullByDefault;
@@ -1,7 +1,7 @@
package net.minecraft.commands.context;
package com.mojang.brigadier.context;
import com.google.common.primitives.Primitives;
import net.minecraft.commands.Command;
import com.mojang.brigadier.Command;
import java.util.Map;
@@ -1,7 +1,7 @@
package net.minecraft.commands.context;
package com.mojang.brigadier.context;
import com.google.common.collect.Maps;
import net.minecraft.commands.Command;
import com.mojang.brigadier.Command;
import java.util.Map;
@@ -1,4 +1,4 @@
package net.minecraft.commands.context;
package com.mojang.brigadier.context;
public class ParsedArgument<T> {
private final String raw;
@@ -0,0 +1,4 @@
@ParametersAreNonnullByDefault
package com.mojang.brigadier.context;
import javax.annotation.ParametersAreNonnullByDefault;
@@ -1,4 +1,4 @@
package net.minecraft.commands.exceptions;
package com.mojang.brigadier.exceptions;
import java.util.Map;
@@ -1,4 +1,4 @@
package net.minecraft.commands.exceptions;
package com.mojang.brigadier.exceptions;
public interface CommandExceptionType {
String getTypeName();
@@ -1,4 +1,4 @@
package net.minecraft.commands.exceptions;
package com.mojang.brigadier.exceptions;
import com.google.common.base.Joiner;
import com.google.common.collect.ImmutableMap;
@@ -1,4 +1,4 @@
package net.minecraft.commands.exceptions;
package com.mojang.brigadier.exceptions;
import com.google.common.collect.ImmutableMap;
@@ -0,0 +1,4 @@
@ParametersAreNonnullByDefault
package com.mojang.brigadier.exceptions;
import javax.annotation.ParametersAreNonnullByDefault;
@@ -1,4 +1,4 @@
@ParametersAreNonnullByDefault
package net.minecraft.commands;
package com.mojang.brigadier;
import javax.annotation.ParametersAreNonnullByDefault;
@@ -1,10 +1,10 @@
package net.minecraft.commands.tree;
package com.mojang.brigadier.tree;
import net.minecraft.commands.Command;
import net.minecraft.commands.arguments.CommandArgumentType;
import net.minecraft.commands.context.CommandContextBuilder;
import net.minecraft.commands.context.ParsedArgument;
import net.minecraft.commands.exceptions.CommandException;
import com.mojang.brigadier.Command;
import com.mojang.brigadier.arguments.CommandArgumentType;
import com.mojang.brigadier.context.CommandContextBuilder;
import com.mojang.brigadier.context.ParsedArgument;
import com.mojang.brigadier.exceptions.CommandException;
public class ArgumentCommandNode<T> extends CommandNode {
private final String name;
@@ -1,9 +1,9 @@
package net.minecraft.commands.tree;
package com.mojang.brigadier.tree;
import com.google.common.collect.Maps;
import net.minecraft.commands.Command;
import net.minecraft.commands.context.CommandContextBuilder;
import net.minecraft.commands.exceptions.CommandException;
import com.mojang.brigadier.Command;
import com.mojang.brigadier.context.CommandContextBuilder;
import com.mojang.brigadier.exceptions.CommandException;
import java.util.Collection;
import java.util.Map;
@@ -1,10 +1,10 @@
package net.minecraft.commands.tree;
package com.mojang.brigadier.tree;
import net.minecraft.commands.Command;
import net.minecraft.commands.CommandDispatcher;
import net.minecraft.commands.context.CommandContextBuilder;
import net.minecraft.commands.exceptions.CommandException;
import net.minecraft.commands.exceptions.ParameterizedCommandExceptionType;
import com.mojang.brigadier.Command;
import com.mojang.brigadier.CommandDispatcher;
import com.mojang.brigadier.context.CommandContextBuilder;
import com.mojang.brigadier.exceptions.CommandException;
import com.mojang.brigadier.exceptions.ParameterizedCommandExceptionType;
public class LiteralCommandNode extends CommandNode {
public static final ParameterizedCommandExceptionType ERROR_INCORRECT_LITERAL = new ParameterizedCommandExceptionType("incorrect_literal", "Expected literal ${expected}", "expected");
@@ -1,7 +1,7 @@
package net.minecraft.commands.tree;
package com.mojang.brigadier.tree;
import net.minecraft.commands.context.CommandContextBuilder;
import net.minecraft.commands.exceptions.CommandException;
import com.mojang.brigadier.context.CommandContextBuilder;
import com.mojang.brigadier.exceptions.CommandException;
public class RootCommandNode extends CommandNode {
public RootCommandNode() {
@@ -1,4 +1,4 @@
@ParametersAreNonnullByDefault
package net.minecraft.commands.tree;
package com.mojang.brigadier.tree;
import javax.annotation.ParametersAreNonnullByDefault;
@@ -1,7 +0,0 @@
package net.minecraft.commands;
import net.minecraft.commands.context.CommandContext;
public interface Command {
void run(CommandContext context);
}
@@ -1,8 +0,0 @@
package net.minecraft.commands.arguments;
import net.minecraft.commands.context.ParsedArgument;
import net.minecraft.commands.exceptions.CommandException;
public interface CommandArgumentType<T> {
ParsedArgument<T> parse(String command) throws CommandException;
}
@@ -1,4 +0,0 @@
@ParametersAreNonnullByDefault
package net.minecraft.commands.arguments;
import javax.annotation.ParametersAreNonnullByDefault;
@@ -1,4 +0,0 @@
@ParametersAreNonnullByDefault
package net.minecraft.commands.exceptions;
import javax.annotation.ParametersAreNonnullByDefault;