Skip to content

Commit

Permalink
MetadataStore no longer sets the default value in get()
Browse files Browse the repository at this point in the history
  • Loading branch information
fullwall committed Feb 19, 2022
1 parent 833a086 commit fb163b8
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
3 changes: 1 addition & 2 deletions src/main/java/net/citizensnpcs/api/npc/MetadataStore.java
Expand Up @@ -21,8 +21,7 @@ public interface MetadataStore {
<T> T get(NPC.Metadata key);

/**
* Fetches metadata from the given key. Sets the default value provided via {@link #set(String, Object)} if the
* metadata is not already stored.
* Fetches metadata from the given key.
*
* @param key
* The key to get metadata from
Expand Down
Expand Up @@ -49,7 +49,6 @@ public <T> T get(String key) {
public <T> T get(String key, T def) {
T t = get(key);
if (t == null) {
set(key, def);
return def;
}
return t;
Expand Down

0 comments on commit fb163b8

Please sign in to comment.