Skip to content

Commit

Permalink
Fix permission check not working and don't bind pickup toggle to togg…
Browse files Browse the repository at this point in the history
…le by default
  • Loading branch information
GeorgH93 committed Dec 7, 2022
1 parent bb3420c commit 7ed7f70
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
1 change: 0 additions & 1 deletion Minepacks/resources/lang/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,6 @@ Command:
- clean
Pickup:
- pickup
- toggle

# Will be shown in the console during startup
LanguageName: "english"
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 7ed7f70

Please sign in to comment.