Skip to content

Commit

Permalink
Add API
Browse files Browse the repository at this point in the history
  • Loading branch information
fullwall committed Apr 23, 2023
1 parent 54eeedf commit ccf73ef
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main/java/net/citizensnpcs/api/npc/NPC.java
Expand Up @@ -449,6 +449,7 @@ public enum Metadata {
* Whether the NPC is currently glowing. Boolean.
*/
GLOWING("glowing"),
HOLOGRAM_LINE_SUPPLIER("hologram-line-supplier"),
/**
* The Minecraft sound to play when hurt. String - Minecraft sound name.
*/
Expand Down Expand Up @@ -477,11 +478,11 @@ public enum Metadata {
* The Minecart item name.
*/
MINECART_ITEM("minecart-item-name"),

/**
* The Minecart item data. Byte.
*/
MINECART_ITEM_DATA("minecart-item-data"),

/**
* The Minecart item offset as defined by Minecraft. {@link Minecart#setDisplayBlockOffset(int)}
*/
Expand Down
4 changes: 4 additions & 0 deletions src/main/java/net/citizensnpcs/api/util/Placeholders.java
Expand Up @@ -42,6 +42,10 @@ private static class PlaceholderProvider {
}
}

public static boolean containsPlayerPlaceholder(String text) {
return PLAYER_PLACEHOLDER_MATCHER.matcher(text).find();
}

private static OfflinePlayer getPlayer(BlockCommandSender sender) {
return CitizensAPI.getNMSHelper().getPlayer(sender);
}
Expand Down

0 comments on commit ccf73ef

Please sign in to comment.