mirror of
https://github.com/GeorgH93/Minepacks.git
synced 2024-11-15 10:55:20 +01:00
Remove old "backpack" permission
This commit is contained in:
parent
d74071acda
commit
2603b9be31
@ -27,14 +27,10 @@ permissions:
|
|||||||
backpack.disable:
|
backpack.disable:
|
||||||
description: This permission group can be used to disable the plugin for certian users/groups/worlds.
|
description: This permission group can be used to disable the plugin for certian users/groups/worlds.
|
||||||
children:
|
children:
|
||||||
backpack: false
|
|
||||||
backpack.use: false
|
backpack.use: false
|
||||||
backpack.others: false
|
backpack.others: false
|
||||||
backpack.keepOnDeath: true
|
backpack.keepOnDeath: true
|
||||||
backpack.clean: false
|
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:
|
backpack.use:
|
||||||
description: Allows a player to open the backpack.
|
description: Allows a player to open the backpack.
|
||||||
default: false
|
default: false
|
||||||
|
@ -77,7 +77,7 @@ public boolean onCommand(CommandSender sender, Command cmd, String arg, String[]
|
|||||||
if(args.length == 0)
|
if(args.length == 0)
|
||||||
{
|
{
|
||||||
// Open player backpack
|
// 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"))
|
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 "help": // Shows the help for the plugin
|
||||||
case "hilfe":
|
case "hilfe":
|
||||||
case "?":
|
case "?":
|
||||||
if(player.hasPermission("backpack.use") || player.hasPermission("backpack"))
|
if(player.hasPermission("backpack.use"))
|
||||||
{
|
{
|
||||||
player.sendMessage(ChatColor.GOLD + "Minepacks Help:");
|
player.sendMessage(ChatColor.GOLD + "Minepacks Help:");
|
||||||
player.sendMessage(ChatColor.AQUA + "/backpack" + ChatColor.WHITE + " - " + plugin.lang.getTranslated("Commands.Description.Backpack"));
|
player.sendMessage(ChatColor.AQUA + "/backpack" + ChatColor.WHITE + " - " + plugin.lang.getTranslated("Commands.Description.Backpack"));
|
||||||
|
@ -43,7 +43,7 @@ public void run()
|
|||||||
{
|
{
|
||||||
for(Player player : Bukkit.getServer().getOnlinePlayers())
|
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)
|
// 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);
|
Backpack backpack = (Backpack) plugin.getBackpackCachedOnly(player);
|
||||||
|
Loading…
Reference in New Issue
Block a user