BloodMagic/src/main/java/WayofTime/bloodmagic/command/CommandBloodMagic.java

35 lines
901 B
Java
Raw Normal View History

package WayofTime.bloodmagic.command;
Command rework (#1434) * Network part finished. * Should be more reasonable now * This should be good enough. * Orb finished, needs strings * Bind finished. Needs strings. * Reformat & Help subcommand * Cleanup, strings, no negative amounts * Removed TODOs * Added missing MaxTier check for Blood Orbs. Added TODO: Test with custom Blood Orbs. * Ritual commands finished. Check for valid placement might be optimized. (TODO) * Access modifiers, moved TODO * Added TODOs for localized strings * DrainUtils postponed until the necessary functionality is available with SoulTickets (telling SoulTicket network from soul ticket, a list of all registered soul tickets per network) * Replaced all occurrences of TextHelper with TextComponentTranslation in the commands section * - Moved Teleports.java to teleport package - added teleposer command - added missing strings - cleanup * Fixed spelling of "Successful(ly)" * getUsage() now returns translation keys. getInfo() is now an explicit String ritual creation command now has proper tab completions help is an additional argument with "-h" or "?" cleanup * teleposerSet final cleanup. * Removed ritual removal command Signed-off-by: tobias <angryaeon@icloud.com> * Check if the tile has a ritual first Signed-off-by: tobias <angryaeon@icloud.com> * A bit more optimisation Signed-off-by: tobias <angryaeon@icloud.com> * Cleanup part 1 Signed-off-by: tobias <angryaeon@icloud.com> * Cleanup part 2 Signed-off-by: tobias <angryaeon@icloud.com> * Part 3 Signed-off-by: tobias <angryaeon@icloud.com> * Part 4 Signed-off-by: tobias <angryaeon@icloud.com> * Updated language file to reflect cleanup & continuity changes. Signed-off-by: tobias <angryaeon@icloud.com> * Change to use an abstract class that gets called instead of calling super on overriden execute() for commands Signed-off-by: tobias <angryaeon@icloud.com> * Use player facing for ritual creation. Signed-off-by: tobias <angryaeon@icloud.com>
2019-02-01 01:46:02 +01:00
import WayofTime.bloodmagic.command.sub.*;
import net.minecraft.command.ICommandSender;
2017-01-01 21:43:34 -08:00
import net.minecraftforge.server.command.CommandTreeBase;
Command rework (#1434) * Network part finished. * Should be more reasonable now * This should be good enough. * Orb finished, needs strings * Bind finished. Needs strings. * Reformat & Help subcommand * Cleanup, strings, no negative amounts * Removed TODOs * Added missing MaxTier check for Blood Orbs. Added TODO: Test with custom Blood Orbs. * Ritual commands finished. Check for valid placement might be optimized. (TODO) * Access modifiers, moved TODO * Added TODOs for localized strings * DrainUtils postponed until the necessary functionality is available with SoulTickets (telling SoulTicket network from soul ticket, a list of all registered soul tickets per network) * Replaced all occurrences of TextHelper with TextComponentTranslation in the commands section * - Moved Teleports.java to teleport package - added teleposer command - added missing strings - cleanup * Fixed spelling of "Successful(ly)" * getUsage() now returns translation keys. getInfo() is now an explicit String ritual creation command now has proper tab completions help is an additional argument with "-h" or "?" cleanup * teleposerSet final cleanup. * Removed ritual removal command Signed-off-by: tobias <angryaeon@icloud.com> * Check if the tile has a ritual first Signed-off-by: tobias <angryaeon@icloud.com> * A bit more optimisation Signed-off-by: tobias <angryaeon@icloud.com> * Cleanup part 1 Signed-off-by: tobias <angryaeon@icloud.com> * Cleanup part 2 Signed-off-by: tobias <angryaeon@icloud.com> * Part 3 Signed-off-by: tobias <angryaeon@icloud.com> * Part 4 Signed-off-by: tobias <angryaeon@icloud.com> * Updated language file to reflect cleanup & continuity changes. Signed-off-by: tobias <angryaeon@icloud.com> * Change to use an abstract class that gets called instead of calling super on overriden execute() for commands Signed-off-by: tobias <angryaeon@icloud.com> * Use player facing for ritual creation. Signed-off-by: tobias <angryaeon@icloud.com>
2019-02-01 01:46:02 +01:00
import net.minecraftforge.server.command.CommandTreeHelp;
2017-08-15 21:30:48 -07:00
public class CommandBloodMagic extends CommandTreeBase {
Command rework (#1434) * Network part finished. * Should be more reasonable now * This should be good enough. * Orb finished, needs strings * Bind finished. Needs strings. * Reformat & Help subcommand * Cleanup, strings, no negative amounts * Removed TODOs * Added missing MaxTier check for Blood Orbs. Added TODO: Test with custom Blood Orbs. * Ritual commands finished. Check for valid placement might be optimized. (TODO) * Access modifiers, moved TODO * Added TODOs for localized strings * DrainUtils postponed until the necessary functionality is available with SoulTickets (telling SoulTicket network from soul ticket, a list of all registered soul tickets per network) * Replaced all occurrences of TextHelper with TextComponentTranslation in the commands section * - Moved Teleports.java to teleport package - added teleposer command - added missing strings - cleanup * Fixed spelling of "Successful(ly)" * getUsage() now returns translation keys. getInfo() is now an explicit String ritual creation command now has proper tab completions help is an additional argument with "-h" or "?" cleanup * teleposerSet final cleanup. * Removed ritual removal command Signed-off-by: tobias <angryaeon@icloud.com> * Check if the tile has a ritual first Signed-off-by: tobias <angryaeon@icloud.com> * A bit more optimisation Signed-off-by: tobias <angryaeon@icloud.com> * Cleanup part 1 Signed-off-by: tobias <angryaeon@icloud.com> * Cleanup part 2 Signed-off-by: tobias <angryaeon@icloud.com> * Part 3 Signed-off-by: tobias <angryaeon@icloud.com> * Part 4 Signed-off-by: tobias <angryaeon@icloud.com> * Updated language file to reflect cleanup & continuity changes. Signed-off-by: tobias <angryaeon@icloud.com> * Change to use an abstract class that gets called instead of calling super on overriden execute() for commands Signed-off-by: tobias <angryaeon@icloud.com> * Use player facing for ritual creation. Signed-off-by: tobias <angryaeon@icloud.com>
2019-02-01 01:46:02 +01:00
2017-08-15 21:30:48 -07:00
public CommandBloodMagic() {
2017-01-01 21:43:34 -08:00
addSubcommand(new SubCommandBind());
addSubcommand(new SubCommandNetwork());
addSubcommand(new SubCommandOrb());
Command rework (#1434) * Network part finished. * Should be more reasonable now * This should be good enough. * Orb finished, needs strings * Bind finished. Needs strings. * Reformat & Help subcommand * Cleanup, strings, no negative amounts * Removed TODOs * Added missing MaxTier check for Blood Orbs. Added TODO: Test with custom Blood Orbs. * Ritual commands finished. Check for valid placement might be optimized. (TODO) * Access modifiers, moved TODO * Added TODOs for localized strings * DrainUtils postponed until the necessary functionality is available with SoulTickets (telling SoulTicket network from soul ticket, a list of all registered soul tickets per network) * Replaced all occurrences of TextHelper with TextComponentTranslation in the commands section * - Moved Teleports.java to teleport package - added teleposer command - added missing strings - cleanup * Fixed spelling of "Successful(ly)" * getUsage() now returns translation keys. getInfo() is now an explicit String ritual creation command now has proper tab completions help is an additional argument with "-h" or "?" cleanup * teleposerSet final cleanup. * Removed ritual removal command Signed-off-by: tobias <angryaeon@icloud.com> * Check if the tile has a ritual first Signed-off-by: tobias <angryaeon@icloud.com> * A bit more optimisation Signed-off-by: tobias <angryaeon@icloud.com> * Cleanup part 1 Signed-off-by: tobias <angryaeon@icloud.com> * Cleanup part 2 Signed-off-by: tobias <angryaeon@icloud.com> * Part 3 Signed-off-by: tobias <angryaeon@icloud.com> * Part 4 Signed-off-by: tobias <angryaeon@icloud.com> * Updated language file to reflect cleanup & continuity changes. Signed-off-by: tobias <angryaeon@icloud.com> * Change to use an abstract class that gets called instead of calling super on overriden execute() for commands Signed-off-by: tobias <angryaeon@icloud.com> * Use player facing for ritual creation. Signed-off-by: tobias <angryaeon@icloud.com>
2019-02-01 01:46:02 +01:00
addSubcommand(new SubCommandRitual());
addSubcommand(new SubCommandTeleposer());
addSubcommand(new CommandTreeHelp(this));
}
@Override
2017-08-15 21:30:48 -07:00
public String getName() {
2017-01-01 21:43:34 -08:00
return "bloodmagic";
}
@Override
2017-08-15 21:30:48 -07:00
public String getUsage(ICommandSender sender) {
2017-01-01 21:43:34 -08:00
return "/bloodmagic help";
}
@Override
2017-08-15 21:30:48 -07:00
public int getRequiredPermissionLevel() {
return 2;
}
}