Skip to content

Commit

Permalink
Bugfixes
Browse files Browse the repository at this point in the history
  • Loading branch information
shinixsensei committed Sep 11, 2021
1 parent 92d6081 commit d48e18b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion out/production/RIN/plugin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ commands:
delhome:
description: Delete a Home Point from your Home Point list.
usage: /<command> <name>
aliases: [ dh, del0h, dhome ]
aliases: [ dh, delh, dhome ]
homes:
description: View a list of all Home Points owned by you.
usage: /<command>
Expand Down
5 changes: 3 additions & 2 deletions src/dev/angelsflyinhell/rin/plugins/QuickHomes.java
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,12 @@ public boolean onCommand(CommandSender sender, Command command, String label, St
player.sendMessage(ConsoleUtils.PREFIX + "Set Home Point: " + args[0]);
}

if (command.getName().equalsIgnoreCase("delhomes")) {
if (command.getName().equalsIgnoreCase("delhome")) {
String key = player.getUniqueId() + "home" + args[0];
if (QHSave.propExist(key)) {
QHSave.addKey(key, "DELETED");
player.sendMessage(ConsoleUtils.PREFIX + "Deleted Home Point: " + args[0]);
return true;
}
player.sendMessage(ConsoleUtils.PREFIX + "Couldn't find Home Point \"" + args[0] + "\"");
}
Expand All @@ -60,7 +61,7 @@ public boolean onCommand(CommandSender sender, Command command, String label, St
int playerHomes = 0;
for (int i = 0; i < QHSave.getKeySize(); i++) {
String key = QHSave.properties.keySet().toArray()[i].toString();
if (key.startsWith(String.valueOf(player.getUniqueId()))) {
if (key.startsWith(String.valueOf(player.getUniqueId())) && !Objects.equals(QHSave.getValue(key), "DELETED")) {
playerHomes++;
String outKey = key.replace(player.getUniqueId() + "home", "");
player.sendMessage(ConsoleUtils.PREFIX + (playerHomes) + ". " + outKey);
Expand Down
2 changes: 1 addition & 1 deletion src/plugin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ commands:
delhome:
description: Delete a Home Point from your Home Point list.
usage: /<command> <name>
aliases: [ dh, del0h, dhome ]
aliases: [ dh, delh, dhome ]
homes:
description: View a list of all Home Points owned by you.
usage: /<command>
Expand Down

0 comments on commit d48e18b

Please sign in to comment.