mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-25 22:56:45 +01:00
update adventure (used for chat)
This commit is contained in:
parent
bcd260d9c1
commit
0ce316e428
@ -1,5 +1,6 @@
|
|||||||
Version 2.1.159
|
Version 2.1.159
|
||||||
Fixed a memory leak involving renamed mobs
|
Fixed a memory leak involving renamed mobs
|
||||||
|
Updated Adventure library (used in our chat code)
|
||||||
|
|
||||||
Version 2.1.158
|
Version 2.1.158
|
||||||
Fixed a bug where Lure level 4 and above would break fishing with the new Master Angler
|
Fixed a bug where Lure level 4 and above would break fishing with the new Master Angler
|
||||||
|
6
pom.xml
6
pom.xml
@ -202,12 +202,12 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>net.kyori</groupId>
|
<groupId>net.kyori</groupId>
|
||||||
<artifactId>adventure-text-serializer-gson</artifactId>
|
<artifactId>adventure-text-serializer-gson</artifactId>
|
||||||
<version>4.2.0-SNAPSHOT</version>
|
<version>4.3.0-SNAPSHOT</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>net.kyori</groupId>
|
<groupId>net.kyori</groupId>
|
||||||
<artifactId>adventure-api</artifactId>
|
<artifactId>adventure-api</artifactId>
|
||||||
<version>4.2.0-SNAPSHOT</version>
|
<version>4.2.0</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>net.kyori</groupId>
|
<groupId>net.kyori</groupId>
|
||||||
@ -232,7 +232,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.maven.scm</groupId>
|
<groupId>org.apache.maven.scm</groupId>
|
||||||
<artifactId>maven-scm-provider-gitexe</artifactId>
|
<artifactId>maven-scm-provider-gitexe</artifactId>
|
||||||
<version>1.8.1</version>
|
<version>1.9.4</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.bstats</groupId>
|
<groupId>org.bstats</groupId>
|
||||||
|
@ -56,8 +56,8 @@ public final class MobHealthbarUtils {
|
|||||||
/*
|
/*
|
||||||
* Store the name in metadata
|
* Store the name in metadata
|
||||||
*/
|
*/
|
||||||
if(target.getMetadata("mcMMO_oldName").size() <= 0 && originalName != null)
|
if(target.getMetadata(TransientMetadataTools.OLD_NAME_METAKEY).size() <= 0 && originalName != null)
|
||||||
target.setMetadata("mcMMO_oldName", new OldName(originalName, plugin));
|
target.setMetadata(TransientMetadataTools.OLD_NAME_METAKEY, new OldName(originalName, plugin));
|
||||||
|
|
||||||
if (oldName == null) {
|
if (oldName == null) {
|
||||||
oldName = "";
|
oldName = "";
|
||||||
|
@ -4,7 +4,7 @@ import com.gmail.nossr50.mcMMO;
|
|||||||
import org.bukkit.entity.LivingEntity;
|
import org.bukkit.entity.LivingEntity;
|
||||||
|
|
||||||
public class TransientMetadataTools {
|
public class TransientMetadataTools {
|
||||||
public static final String OLD_NAME_METAKEY = "mcMMO_oldName";
|
public static final String OLD_NAME_METAKEY = TransientMetadataTools.OLD_NAME_METAKEY;
|
||||||
private final mcMMO pluginRef;
|
private final mcMMO pluginRef;
|
||||||
|
|
||||||
public TransientMetadataTools(mcMMO pluginRef) {
|
public TransientMetadataTools(mcMMO pluginRef) {
|
||||||
|
@ -448,7 +448,7 @@ public final class CombatUtils {
|
|||||||
*/
|
*/
|
||||||
public static void fixNames(@NotNull LivingEntity entity)
|
public static void fixNames(@NotNull LivingEntity entity)
|
||||||
{
|
{
|
||||||
List<MetadataValue> metadataValue = entity.getMetadata("mcMMO_oldName");
|
List<MetadataValue> metadataValue = entity.getMetadata(TransientMetadataTools.OLD_NAME_METAKEY);
|
||||||
|
|
||||||
if(metadataValue.size() <= 0)
|
if(metadataValue.size() <= 0)
|
||||||
return;
|
return;
|
||||||
|
Loading…
Reference in New Issue
Block a user