Updated to support MythicMobs 5.0.2. Temp using files directly for MVdWPlaceholderAPI and MythicMobs

This commit is contained in:
Zeshan Aslam 2022-03-26 11:33:22 -04:00
parent fc693d29a3
commit 794135b02e
12 changed files with 17 additions and 10 deletions

View File

@ -4,7 +4,7 @@ plugins {
} }
group = 'com.zeshanaslam' group = 'com.zeshanaslam'
version = '3.5.6' version = '3.5.7'
repositories { repositories {
mavenCentral() mavenCentral()
@ -22,11 +22,11 @@ repositories {
} }
maven { maven {
name = 'langutils-repo' name = 'langutils-repo'
url 'https://raw.github.com/MascusJeoraly/LanguageUtils/mvn-repo/' url = 'https://raw.github.com/MascusJeoraly/LanguageUtils/mvn-repo/'
} }
maven { maven {
name = 'Lumine Releases' name = 'Lumine Releases'
url 'https://mvn.lumine.io/repository/maven-public/' url = 'https://mvn.lumine.io/repository/maven-public/'
} }
maven { maven {
name = 'papi-repo' name = 'papi-repo'
@ -40,16 +40,15 @@ repositories {
dependencies { dependencies {
compileOnly 'org.spigotmc:spigot-api:1.18-R0.1-SNAPSHOT' compileOnly 'org.spigotmc:spigot-api:1.18-R0.1-SNAPSHOT'
compileOnly 'io.lumine.xikage:MythicMobs:4.9.1'
compileOnly 'me.clip:placeholderapi:2.10.10' compileOnly 'me.clip:placeholderapi:2.10.10'
compileOnly 'org.apache.commons:commons-lang3:3.12.0' compileOnly 'org.apache.commons:commons-lang3:3.12.0'
compileOnly 'com.meowj:LangUtils:1.9' compileOnly 'com.meowj:LangUtils:1.9'
compileOnly 'be.maximvdw:MVdWPlaceholderAPI:3.1.1' compileOnly files('temp_libs/MVdWPlaceholderAPI.jar')
compileOnly files('temp_libs/MythicMobs-5.0.2.jar')
implementation 'org.codemc.worldguardwrapper:worldguardwrapper:1.2.0-SNAPSHOT' implementation 'org.codemc.worldguardwrapper:worldguardwrapper:1.2.0-SNAPSHOT'
} }
def targetJavaVersion = 8 def targetJavaVersion = 16
java { java {
def javaVersion = JavaVersion.toVersion(targetJavaVersion) def javaVersion = JavaVersion.toVersion(targetJavaVersion)
sourceCompatibility = javaVersion sourceCompatibility = javaVersion

View File

@ -1,14 +1,22 @@
package com.zeshanaslam.actionhealth.support; package com.zeshanaslam.actionhealth.support;
import io.lumine.xikage.mythicmobs.MythicMobs; import io.lumine.mythic.bukkit.BukkitAPIHelper;
import io.lumine.mythic.bukkit.MythicBukkit;
import org.bukkit.Bukkit;
import org.bukkit.entity.Entity; import org.bukkit.entity.Entity;
public class MythicMobsSupport { public class MythicMobsSupport {
private static final MythicBukkit plugin = (MythicBukkit) Bukkit.getServer().getPluginManager().getPlugin("MythicMobs");
public String getMythicName(Entity entity) { public String getMythicName(Entity entity) {
if (MythicMobs.inst().getAPIHelper().isMythicMob(entity)) { if (plugin == null) {
return MythicMobs.inst().getAPIHelper().getMythicMobInstance(entity).getType().getInternalName(); return null;
} }
BukkitAPIHelper bucketApiHelper = plugin.getAPIHelper();
if (bucketApiHelper.isMythicMob(entity)) {
return bucketApiHelper.getMythicMobInstance(entity).getType().getInternalName();
}
return null; return null;
} }
} }