Fix permission check not working and don't bind pickup toggle to toggle by default

This commit is contained in:
GeorgH93 2022-12-07 20:30:19 +01:00
parent bb3420c550
commit 7ed7f70512
No known key found for this signature in database
GPG Key ID: D1630D37F9E4B3C8
2 changed files with 3 additions and 4 deletions

View File

@ -117,7 +117,6 @@ Command:
- clean
Pickup:
- pickup
- toggle
# Will be shown in the console during startup
LanguageName: "english"

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 2021 GeorgH93
* Copyright (C) 2022 GeorgH93
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -78,8 +78,8 @@ public void run()
// No permission ot use the backpack.
if (!player.hasPermission(Permissions.USE)) return;
// If a player has either of these permissions, pickup is allowed.
if (!player.hasPermission(Permissions.FULL_PICKUP) && !player.hasPermission(Permissions.PICKUP_TOGGLE));
// Check if auto pickup is allowed
if (!player.hasPermission(Permissions.FULL_PICKUP)) return;
// Inventory is full
if (player.getInventory().firstEmpty() != -1) return;