Cleanups and corrections

+ Bug fixes
+ Fixed some string formatting issues
pull/2/head
Joey Hines 2020-01-08 15:15:36 -06:00
parent c9c4be387b
commit 5d6daa0414
7 changed files with 10 additions and 6 deletions

View File

@ -65,7 +65,7 @@ public class AddResidentCommand extends GeoffreyCommand {
try { try {
JsonElement json = parseJSON(s); JsonElement json = parseJSON(s);
String msg = ChatColor.GREEN + newResidentName + "has been added to your town."; String msg = ChatColor.GREEN + newResidentName + " has been added to your town.";
commandSender.sendMessage(msg); commandSender.sendMessage(msg);
} }
catch (GeoffreyCommandError e) { catch (GeoffreyCommandError e) {

View File

@ -61,7 +61,7 @@ public class DeleteResourceCommand extends GeoffreyCommand {
} }
else { else {
sender.sendMessage(ChatColor.RED + "Console can not remove reosurces!"); sender.sendMessage(ChatColor.RED + "Console can not remove resources!");
} }
return true; return true;

View File

@ -44,8 +44,8 @@ public class EditNameCommand extends GeoffreyCommand {
Player player = ((Player) sender).getPlayer(); Player player = ((Player) sender).getPlayer();
String oldLocationName = parsedArgs.get(0); String newLocationName = parsedArgs.get(0);
String newLocationName = parsedArgs.get(1); String oldLocationName = parsedArgs.get(1);
params.put("mc_uuid", player.getUniqueId().toString().replace("-", "")); params.put("mc_uuid", player.getUniqueId().toString().replace("-", ""));
params.put("new_name", oldLocationName); params.put("new_name", oldLocationName);

View File

@ -42,7 +42,7 @@ public class RegisterCommand extends GeoffreyCommand {
CommandCallback(CommandSender sender) { CommandCallback(CommandSender sender) {
super(sender); super(sender);
errors.put("LocationLookUpError", "You have more than one location. Please specify a name."); errors.put("PlayerInDBError", "You are already registered, stop being so goober-ish.");
} }
@Override @Override

View File

@ -63,7 +63,7 @@ public class RemoveResidentCommand extends GeoffreyCommand {
try { try {
JsonElement json = parseJSON(s); JsonElement json = parseJSON(s);
String msg = ChatColor.GREEN + residentName + "has been removed from your town."; String msg = ChatColor.GREEN + residentName + " has been removed from your town.";
commandSender.sendMessage(msg); commandSender.sendMessage(msg);
} }
catch (GeoffreyCommandError e) { catch (GeoffreyCommandError e) {

View File

@ -38,6 +38,7 @@ public final class GeoffreyMC extends JavaPlugin {
this.getCommand("geoffrey_add_town").setExecutor(addLocationCommand); this.getCommand("geoffrey_add_town").setExecutor(addLocationCommand);
this.getCommand("geoffrey_add_farm").setExecutor(addLocationCommand); this.getCommand("geoffrey_add_farm").setExecutor(addLocationCommand);
this.getCommand("geoffrey_add_attraction").setExecutor(addLocationCommand); this.getCommand("geoffrey_add_attraction").setExecutor(addLocationCommand);
this.getCommand("geoffrey_add_market").setExecutor(addLocationCommand);
RegisterCommand registerCommand = new RegisterCommand(this); RegisterCommand registerCommand = new RegisterCommand(this);
this.getCommand("geoffrey_register").setExecutor(registerCommand); this.getCommand("geoffrey_register").setExecutor(registerCommand);

View File

@ -1,5 +1,8 @@
# GeoffreyAPI Settings # GeoffreyAPI Settings
geoffrey_api: geoffrey_api:
# Geoffrey API Key
key: '' key: ''
# Geoffrey API Base Url (e.g. test.zerohighdef.com/GeoffreyApp/api/)
api_base_url: '' api_base_url: ''
# Geoffrey Base Url (e.g. test.zerohighdef.com)
base_url: '' base_url: ''