From 2603b9be31860f074e9aa40700b61405eb616dca Mon Sep 17 00:00:00 2001 From: GeorgH93 Date: Mon, 2 Apr 2018 18:09:35 +0200 Subject: [PATCH] Remove old "backpack" permission --- resources/plugin.yml | 4 ---- .../pcgamingfreaks/Minepacks/Bukkit/Commands/OnCommand.java | 4 ++-- src/at/pcgamingfreaks/Minepacks/Bukkit/ItemsCollector.java | 2 +- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/resources/plugin.yml b/resources/plugin.yml index 12482c0..5de8add 100644 --- a/resources/plugin.yml +++ b/resources/plugin.yml @@ -27,14 +27,10 @@ permissions: backpack.disable: description: This permission group can be used to disable the plugin for certian users/groups/worlds. children: - backpack: false backpack.use: false backpack.others: false backpack.keepOnDeath: true backpack.clean: false - backpack: - description: Allows a player to open the backpack. This is a fallback permission since some permission plugins have problems with the backpack.use permission. - default: false backpack.use: description: Allows a player to open the backpack. default: false diff --git a/src/at/pcgamingfreaks/Minepacks/Bukkit/Commands/OnCommand.java b/src/at/pcgamingfreaks/Minepacks/Bukkit/Commands/OnCommand.java index 71c436b..084784a 100644 --- a/src/at/pcgamingfreaks/Minepacks/Bukkit/Commands/OnCommand.java +++ b/src/at/pcgamingfreaks/Minepacks/Bukkit/Commands/OnCommand.java @@ -77,7 +77,7 @@ public boolean onCommand(CommandSender sender, Command cmd, String arg, String[] if(args.length == 0) { // Open player backpack - if(player.hasPermission("backpack.use") || player.hasPermission("backpack")) + if(player.hasPermission("backpack.use")) { if(gameModes.contains(player.getGameMode()) || player.hasPermission("backpack.ignoreGameMode")) { @@ -120,7 +120,7 @@ public boolean onCommand(CommandSender sender, Command cmd, String arg, String[] case "help": // Shows the help for the plugin case "hilfe": case "?": - if(player.hasPermission("backpack.use") || player.hasPermission("backpack")) + if(player.hasPermission("backpack.use")) { player.sendMessage(ChatColor.GOLD + "Minepacks Help:"); player.sendMessage(ChatColor.AQUA + "/backpack" + ChatColor.WHITE + " - " + plugin.lang.getTranslated("Commands.Description.Backpack")); diff --git a/src/at/pcgamingfreaks/Minepacks/Bukkit/ItemsCollector.java b/src/at/pcgamingfreaks/Minepacks/Bukkit/ItemsCollector.java index 4e60bc1..c822531 100644 --- a/src/at/pcgamingfreaks/Minepacks/Bukkit/ItemsCollector.java +++ b/src/at/pcgamingfreaks/Minepacks/Bukkit/ItemsCollector.java @@ -43,7 +43,7 @@ public void run() { for(Player player : Bukkit.getServer().getOnlinePlayers()) { - if(player.getInventory().firstEmpty() == -1 && (player.hasPermission("backpack.use") || player.hasPermission("backpack")) && player.hasPermission("backpack.fullpickup")) + if(player.getInventory().firstEmpty() == -1 && player.hasPermission("backpack.use") && player.hasPermission("backpack.fullpickup")) { // Only check loaded backpacks (loading them would take to much time for a repeating task, the backpack will be loaded async soon enough) Backpack backpack = (Backpack) plugin.getBackpackCachedOnly(player);