Skip to content
This repository was archived by the owner on Nov 25, 2019. It is now read-only.

Commit 2bf6472

Browse files
committed
Blep
1 parent 33863c3 commit 2bf6472

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

PGM/src/main/java/tc/oc/pgm/mutation/types/kit/TeamChestMutation.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ public void kits(MatchPlayer player, List<Kit> kits) {
7171
public void onChestUse(PlayerInteractEvent event) {
7272
Player bukkitPlayer = event.getPlayer();
7373
Optional<MatchPlayer> optPlayer = match().participant((Entity) bukkitPlayer);
74-
if (optPlayer.isPresent() ||
74+
if (!optPlayer.isPresent() ||
7575
!(event.getAction() == Action.RIGHT_CLICK_AIR || event.getAction() == Action.RIGHT_CLICK_BLOCK) ||
7676
event.getItem() == null ||
7777
event.getItem().getType() != TOOL_TYPE) {
@@ -93,7 +93,7 @@ public void onInventoryClick(InventoryClickEvent event) {
9393
if (event.getCurrentItem() == null) return;
9494

9595
// No putting blacklisted items (ender chest, possibly wool) into the chest
96-
Optional<Inventory> teamChest = getTeamsInventory(event.getActor());
96+
Optional<Inventory> teamChest = getTeamsInventory(player);
9797
if (teamChest.map(teamInventory -> teamInventory.equals(event.getView().getTopInventory())).orElse(false) &&
9898
isBlacklistedItem(event.getCurrentItem())) {
9999
event.setCancelled(true);

0 commit comments

Comments
 (0)