Skip to content

Commit 84843c0

Browse files
committed
Fix NPE in Wool
1 parent f2cba19 commit 84843c0

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • src/main/java/in/twizmwaz/cardinal/module/objective/wool

src/main/java/in/twizmwaz/cardinal/module/objective/wool/Wool.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ public Wool(Match match, String id, boolean required, Team team, DyeColor color,
132132
public void onInventoryClick(InventoryClickEvent event) {
133133
Player player = (Player) event.getWhoClicked();
134134
ItemStack item = event.getCurrentItem();
135-
if (!complete && item.getType().equals(Material.WOOL)
135+
if (!complete && item != null && item.getType().equals(Material.WOOL)
136136
&& item.getData().getData() == color.getData() && team.equals(Team.getTeam(player))) {
137137
touched = true;
138138
boolean showMessage = false;

0 commit comments

Comments
 (0)