Compare commits

...

4 Commits

Author SHA1 Message Date
Zeshan Aslam 6184f8ff0a
Update README.md 2022-03-26 11:35:58 -04:00
Zeshan Aslam 52fba93322 Merge remote-tracking branch 'origin/master' 2022-03-26 11:33:38 -04:00
Zeshan Aslam 794135b02e Updated to support MythicMobs 5.0.2. Temp using files directly for MVdWPlaceholderAPI and MythicMobs 2022-03-26 11:33:22 -04:00
Zeshan Aslam ecfda68d2c
Update README.md 2022-03-26 11:32:11 -04:00
13 changed files with 22 additions and 12 deletions

View File

@ -5,7 +5,10 @@ Spigot page: [Click Here](https://www.spigotmc.org/resources/action-bar-health.2
# Dependencies # Dependencies
**Required** **Required**
- Java 8 or greater - Version v3.5.7 or greater
- Java 16 or greater
- Versions below v3.5.7
- Java 8 or greater
**Optional** **Optional**
- For region disable option: - For region disable option:
@ -29,7 +32,7 @@ Default config: [Click Here](https://github.com/zeshan321/ActionHealth/blob/mast
A list of the community made translations: [Click Here](https://github.com/zeshan321/ActionHealth/wiki/Community-Translations) A list of the community made translations: [Click Here](https://github.com/zeshan321/ActionHealth/wiki/Community-Translations)
# Compiling # Compiling
To compile ActionHealth, you need at least **Java 8** and an internet connection. Then, clone this repo, run `./gradlew clean shadowJar` and get your jar from `build/libs/ActionHealh-VERSION-all.jar`. To compile ActionHealth, you need at least **Java 16** and an internet connection. Then, clone this repo, run `./gradlew clean shadowJar` and get your jar from `build/libs/ActionHealh-VERSION-all.jar`.
# More info # More info
Custom styles, screenshots, command information and more can be found on the spigot page. Custom styles, screenshots, command information and more can be found on the spigot page.

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;
} }
} }