mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-25 14:46:46 +01:00
Memory leak fix
This commit is contained in:
parent
ab276ffe33
commit
bcd260d9c1
@ -1,3 +1,6 @@
|
||||
Version 2.1.159
|
||||
Fixed a memory leak involving renamed mobs
|
||||
|
||||
Version 2.1.158
|
||||
Fixed a bug where Lure level 4 and above would break fishing with the new Master Angler
|
||||
URLs in party/admin chat work again (use https:// in front to make links clickable)
|
||||
|
2
pom.xml
2
pom.xml
@ -2,7 +2,7 @@
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>com.gmail.nossr50.mcMMO</groupId>
|
||||
<artifactId>mcMMO</artifactId>
|
||||
<version>2.1.158</version>
|
||||
<version>2.1.159-SNAPSHOT</version>
|
||||
<name>mcMMO</name>
|
||||
<url>https://github.com/mcMMO-Dev/mcMMO</url>
|
||||
<scm>
|
||||
|
@ -4,6 +4,7 @@ import com.gmail.nossr50.mcMMO;
|
||||
import org.bukkit.entity.LivingEntity;
|
||||
|
||||
public class TransientMetadataTools {
|
||||
public static final String OLD_NAME_METAKEY = "mcMMO_oldName";
|
||||
private final mcMMO pluginRef;
|
||||
|
||||
public TransientMetadataTools(mcMMO pluginRef) {
|
||||
@ -17,6 +18,10 @@ public class TransientMetadataTools {
|
||||
livingEntity.removeMetadata(mcMMO.customNameKey, pluginRef);
|
||||
}
|
||||
|
||||
if(livingEntity.hasMetadata(OLD_NAME_METAKEY)) {
|
||||
livingEntity.removeMetadata(OLD_NAME_METAKEY, pluginRef);
|
||||
}
|
||||
|
||||
//Involved in changing mob names to hearts
|
||||
if (livingEntity.hasMetadata(mcMMO.customVisibleKey)) {
|
||||
livingEntity.setCustomNameVisible(livingEntity.getMetadata(mcMMO.customVisibleKey).get(0).asBoolean());
|
||||
|
Loading…
Reference in New Issue
Block a user