Added add_tunnel and delete commands

pull/2/head
Joey Hines 2019-12-29 10:46:04 -06:00
parent a3c12f8dd6
commit 9ebf240b16
3 changed files with 18 additions and 2 deletions

View File

@ -50,6 +50,12 @@ public final class GeoffreyMC extends JavaPlugin {
AddResourceCommand addResourceCommand = new AddResourceCommand(this); AddResourceCommand addResourceCommand = new AddResourceCommand(this);
this.getCommand("geoffrey_add_resource").setExecutor(addResourceCommand); this.getCommand("geoffrey_add_resource").setExecutor(addResourceCommand);
AddTunnelCommand addTunnelCommand = new AddTunnelCommand(this);
this.getCommand("geoffrey_add_tunnel").setExecutor(addTunnelCommand);
DeleteCommand deleteCommand = new DeleteCommand(this);
this.getCommand("geoffrey_delete").setExecutor(deleteCommand);
} }
} }

View File

@ -25,8 +25,8 @@ public abstract class GeoffreyAPICallback implements ICallback {
errors.put("PlayerNotFound", "You are not in the database, you must register first!"); errors.put("PlayerNotFound", "You are not in the database, you must register first!");
errors.put("NoLocationsInDatabase", "You have no locations in the database, you must add some first!"); errors.put("NoLocationsInDatabase", "You have no locations in the database, you must add some first!");
errors.put("DataError", "Slow down their slugger, that's a long word or number you are trying to cram into me, try again with something smaller, please"); errors.put("DataError", "Slow down their slugger, that's a long word or number you are trying to cram into me, try again with something smaller, please");
errors.put("LocationHasTunnelError", "that location already has a tunnel you goober."); errors.put("LocationHasTunnelError", "That location already has a tunnel you goober.");
errors.put( "EntryNameNotUniqueError", "that name has already been used, be more creative dingus kong"); errors.put( "EntryNameNotUniqueError", "That name has already been used, be more creative dingus kong");
} }
protected JsonElement parseJSON(String string) throws GeoffreyCommandError { protected JsonElement parseJSON(String string) throws GeoffreyCommandError {

View File

@ -71,6 +71,16 @@ commands:
aliases: [add_resource] aliases: [add_resource]
permission: geoffrey.add permission: geoffrey.add
usage: /add_resource [resource name] [farm name] usage: /add_resource [resource name] [farm name]
geoffrey_add_tunnel:
description: Adds a tunnel to a location
aliases: [add_tunnel]
permission: geoffrey.add
usage: /add_tunnel [tunnel direction] [tunnel number] [location name]
geoffrey_delete:
description: Deletes a location in Geoffrey
aliases: [delete]
permission: geoffrey.add
usage: /delete [location name]
permissions: permissions:
add: add: