Skip to content

Commit

Permalink
Implemented fix for error on getting items from creative
Browse files Browse the repository at this point in the history
  • Loading branch information
Picono435 committed Jul 5, 2021
1 parent 7560efa commit ed90e27
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions src/main/java/com/gmail/picono435/picojobs/api/Type.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,14 @@ public static Type getType(String name) {
}

public static List<Type> getTypes(List<String> names) {
System.out.println(names);
List<Type> types = new ArrayList<Type>();
for(String name : names) {
types.add(getType(name));
}
return types;
}

private String whitelistType;
private final String whitelistType;

private Type(String whitelistType) {
this.whitelistType = whitelistType;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public class ClickInventoryListener implements Listener {

@EventHandler()
public void onBasicClick(InventoryClickEvent e) {
if(e.getCurrentItem() == null || e.getCurrentItem().getItemMeta() == null || e.getCurrentItem().getItemMeta().getDisplayName() == null) return;
if(e.getCurrentItem() == null || !e.getCurrentItem().hasItemMeta()) return;

/*
* Choose Jobs Menu Clicking Event
Expand Down

0 comments on commit ed90e27

Please sign in to comment.