mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-08 19:34:09 +01:00
[Bleeding] Added missing NPE protection to removeMetadata(). Fixes BUKKIT-933
By: rmichela <deltahat@gmail.com>
This commit is contained in:
parent
9bca84ee5b
commit
99569c1767
1 changed files with 1 additions and 0 deletions
|
@ -82,6 +82,7 @@ public abstract class MetadataStoreBase<T> {
|
|||
public synchronized void removeMetadata(T subject, String metadataKey, Plugin owningPlugin) {
|
||||
String key = cachedDisambiguate(subject, metadataKey);
|
||||
List<MetadataValue> metadataList = metadataMap.get(key);
|
||||
if (metadataList == null) return;
|
||||
for (int i = 0; i < metadataList.size(); i++) {
|
||||
if (metadataList.get(i).getOwningPlugin().equals(owningPlugin)) {
|
||||
metadataList.remove(i);
|
||||
|
|
Loading…
Reference in a new issue