Skip to content

Commit

Permalink
Added #button, #container, #door, and #pressure_plate tags
Browse files Browse the repository at this point in the history
  • Loading branch information
Intelli committed May 13, 2024
1 parent 5859958 commit e6557ab
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
6 changes: 5 additions & 1 deletion src/main/java/net/coreprotect/command/CommandHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -1121,9 +1121,13 @@ else if (argument.startsWith("#")) {
return worldName;
}

private static Map<String, Set<Material>> getTags() {
protected static Map<String, Set<Material>> getTags() {
Map<String, Set<Material>> tagMap = new HashMap<>();
tagMap.put("#button", BlockGroup.BUTTONS);
tagMap.put("#container", BlockGroup.CONTAINERS);
tagMap.put("#door", BlockGroup.DOORS);
tagMap.put("#natural", BlockGroup.NATURAL_BLOCKS);
tagMap.put("#pressure_plate", BlockGroup.PRESSURE_PLATES);
tagMap.put("#shulker_box", BlockGroup.SHULKER_BOXES);
return tagMap;
}
Expand Down
5 changes: 3 additions & 2 deletions src/main/java/net/coreprotect/command/TabHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -318,8 +318,9 @@ else if ((sender.hasPermission("coreprotect.lookup") || sender.hasPermission("co
}

// add custom tags
materialList.add("#natural");
materialList.add("#shulker_box");
for (String tag : CommandHandler.getTags().keySet()) {
materialList.add(tag);
}

materials = new ArrayList<>(materialList);
}
Expand Down

0 comments on commit e6557ab

Please sign in to comment.