geforkt von Mirrors/Paper
[Bleeding] Added missing NPE protection to removeMetadata(). Fixes BUKKIT-933
By: rmichela <deltahat@gmail.com>
Dieser Commit ist enthalten in:
Ursprung
9bca84ee5b
Commit
99569c1767
@ -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);
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren