Remove old "backpack" permission

This commit is contained in:
GeorgH93 2018-04-02 18:09:35 +02:00
parent d74071acda
commit 2603b9be31
3 changed files with 3 additions and 7 deletions

View File

@ -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

View File

@ -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"));

View File

@ -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);