Skip to content

Commit

Permalink
Can no longer drop lobby items
Browse files Browse the repository at this point in the history
Took 2 minutes
  • Loading branch information
TheNathanSpace committed Sep 1, 2021
1 parent 79cc137 commit f739757
Showing 1 changed file with 3 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import org.bukkit.event.player.PlayerDropItemEvent;
import org.bukkit.inventory.ItemStack;

import javax.persistence.Lob;
import java.util.Arrays;
import java.util.List;

Expand All @@ -35,13 +36,8 @@ public void onItemDrop(PlayerDropItemEvent playerDropItemEvent)

if (itemStack != null)
{
if (itemStack.equals(LobbyUtil.joinGameStar))
{
playerDropItemEvent.setCancelled(true);
return;
}

if (itemStack.equals(LobbyUtil.rulesBook))
List<ItemStack> undroppable = Arrays.asList(LobbyUtil.joinGameStar, LobbyUtil.rulesBook, LobbyUtil.inQueueStar, LobbyUtil.leaveBarrier, GameInstance.gameModifierItemStack);
if (undroppable.contains(itemStack))
{
playerDropItemEvent.setCancelled(true);
return;
Expand Down

0 comments on commit f739757

Please sign in to comment.