mirror of
https://github.com/JamesPeters98/ChestsPlusPlus.git
synced 2024-11-14 22:56:27 +01:00
Fixed Chest Removal Bug
Wasn't removing chest from Chest Link Menu
This commit is contained in:
parent
18e865d63e
commit
81410994cc
@ -128,7 +128,12 @@ public class Config {
|
||||
}
|
||||
});
|
||||
storage.dropInventory(player.getLocation());
|
||||
getPlayer(player).remove(group);
|
||||
Messages.REMOVED_GROUP(player,group);
|
||||
} else {
|
||||
Messages.GROUP_DOESNT_EXIST(player,group);
|
||||
}
|
||||
|
||||
save();
|
||||
}
|
||||
|
||||
|
@ -58,4 +58,12 @@ public class Messages {
|
||||
public static void UNABLE_TO_REMOVE_MEMBER(Player target, String toAdd){
|
||||
target.sendMessage(ChatColor.RED+""+ChatColor.BOLD+TAG+" Unable to remove player "+toAdd+" from ChestLink! Were they already removed?");
|
||||
}
|
||||
|
||||
public static void REMOVED_GROUP(Player target, String toRemove){
|
||||
target.sendMessage(ChatColor.RED+""+ChatColor.BOLD+TAG+" Succesfully removed group "+toRemove+" from your ChestLink!");
|
||||
}
|
||||
|
||||
public static void GROUP_DOESNT_EXIST(Player target, String toRemove){
|
||||
target.sendMessage(ChatColor.RED+""+ChatColor.BOLD+TAG+" "+toRemove+" isn't a valid group to remove!");
|
||||
}
|
||||
}
|
||||
|
@ -102,6 +102,9 @@ public class RemoteChestCommand extends ServerCommand {
|
||||
if (sender.hasPermission(Permissions.REMOVE)) {
|
||||
Config.removeChestLink(player, args[1]);
|
||||
return true;
|
||||
} else {
|
||||
Messages.NO_PERMISSION(player);
|
||||
return true;
|
||||
}
|
||||
} else {
|
||||
player.sendMessage(ChatColor.RED+OPTIONS.REMOVE.commandHelp);
|
||||
|
Loading…
Reference in New Issue
Block a user