Skip to content

Commit

Permalink
Remove MythicMobs support
Browse files Browse the repository at this point in the history
  • Loading branch information
Archy-X committed Jun 22, 2021
1 parent 36877b1 commit 54ee1dc
Show file tree
Hide file tree
Showing 7 changed files with 1 addition and 150 deletions.
11 changes: 0 additions & 11 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -93,11 +93,6 @@
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
<repository>
<id>nexus</id>
<name>Lumine Releases</name>
<url>https://mvn.lumine.io/repository/maven-public/</url>
</repository>
</repositories>
<dependencies>
<dependency>
Expand Down Expand Up @@ -172,12 +167,6 @@
<version>1.7</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>io.lumine.xikage</groupId>
<artifactId>MythicMobs</artifactId>
<version>4.11.0-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>net.luckperms</groupId>
<artifactId>api</artifactId>
Expand Down
13 changes: 0 additions & 13 deletions src/main/java/com/archyx/aureliumskills/AureliumSkills.java
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,6 @@ public class AureliumSkills extends JavaPlugin {
private boolean placeholderAPIEnabled;
private boolean vaultEnabled;
private boolean protocolLibEnabled;
private boolean mythicMobsEnabled;
private boolean townyEnabled;
private TownySupport townySupport;
private boolean luckPermsEnabled;
Expand Down Expand Up @@ -217,14 +216,6 @@ public void onEnable() {
// Load sources
sourceManager = new SourceManager(this);
sourceManager.loadSources();
// Check for MythicMobs
if (Bukkit.getPluginManager().isPluginEnabled("MythicMobs")) {
mythicMobsEnabled = true;
Bukkit.getPluginManager().registerEvents(new MythicMobsSupport(this), this);
getLogger().info("MythicMobs Support Enabled!");
} else {
mythicMobsEnabled = false;
}
// Load boss bar
bossBar = new SkillBossBar(this);
bossBar.loadOptions();
Expand Down Expand Up @@ -718,10 +709,6 @@ public boolean isProtocolLibEnabled() {
return protocolLibEnabled;
}

public boolean isMythicMobsEnabled() {
return mythicMobsEnabled;
}

public boolean isLuckPermsEnabled() {
return luckPermsEnabled;
}
Expand Down
20 changes: 0 additions & 20 deletions src/main/java/com/archyx/aureliumskills/leveler/SkillLeveler.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,10 @@
import com.archyx.aureliumskills.source.SourceTag;
import com.archyx.aureliumskills.support.WorldGuardFlags;
import com.cryptomorin.xseries.XMaterial;
import io.lumine.xikage.mythicmobs.api.bukkit.BukkitAPIHelper;
import org.bukkit.GameMode;
import org.bukkit.Location;
import org.bukkit.block.Block;
import org.bukkit.enchantments.Enchantment;
import org.bukkit.entity.Entity;
import org.bukkit.entity.Player;

import java.util.Locale;
Expand All @@ -26,27 +24,20 @@ public abstract class SkillLeveler {

public final AureliumSkills plugin;
private final SourceManager sourceManager;
private BukkitAPIHelper bukkitAPIHelper;
private Ability ability;
private final String skillName;

public SkillLeveler(AureliumSkills plugin, Skill skill) {
this.plugin = plugin;
this.skillName = skill.toString().toLowerCase(Locale.ENGLISH);
this.sourceManager = plugin.getSourceManager();
if (plugin.isMythicMobsEnabled()) {
bukkitAPIHelper = new BukkitAPIHelper();
}
}

public SkillLeveler(AureliumSkills plugin, Ability ability) {
this.plugin = plugin;
this.ability = ability;
this.skillName = ability.getSkill().toString().toLowerCase(Locale.ENGLISH);
this.sourceManager = plugin.getSourceManager();
if (plugin.isMythicMobsEnabled()) {
bukkitAPIHelper = new BukkitAPIHelper();
}
}

public double getXp(Source source) {
Expand Down Expand Up @@ -138,17 +129,6 @@ public void checkCustomBlocks(Player player, Block block, Skill skill) {
}
}

public boolean isMythicMob(Entity entity) {
if (plugin.isMythicMobsEnabled()) {
if (bukkitAPIHelper != null) {
if (bukkitAPIHelper.isMythicMob(entity)) {
return sourceManager.getCustomMobSet().contains(bukkitAPIHelper.getMythicMobInstance(entity).getType().getInternalName());
}
}
}
return false;
}

public boolean blockXpGain(Player player) {
//Checks if in blocked world
Location location = player.getLocation();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,6 @@ public void onEntityDeath(EntityDeathEvent event) {
if (blockXpGainLocation(e.getLocation(), p)) return;
if (blockXpGainPlayer(p)) return;
if (e.equals(p)) return;
// Make sure not MythicMob
if (isMythicMob(e)) {
return;
}
double spawnerMultiplier = OptionL.getDouble(Option.ARCHERY_SPAWNER_MULTIPLIER);
try {
if (e.hasMetadata("aureliumskills_spawner_mob")) {
Expand Down Expand Up @@ -80,8 +76,6 @@ public void onEntityDamage(EntityDamageByEntityEvent event) {
EntityType type = entity.getType();
if (blockXpGainPlayer(player)) return;
if (entity.equals(player)) return;
// Make sure not MythicMob
if (isMythicMob(entity)) return;
double health = entity.getHealth();
double damage = Math.min(health, event.getFinalDamage());
// Apply spawner multiplier
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,6 @@ public void onEntityDeath(EntityDeathEvent event) {
if (blockXpGainLocation(e.getLocation(), p)) return;
if (blockXpGainPlayer(p)) return;
if (e.equals(p)) return;
// Make sure not MythicMob
if (isMythicMob(e)) {
return;
}
double spawnerMultiplier = OptionL.getDouble(Option.FIGHTING_SPAWNER_MULTIPLIER);
try {
if (e.hasMetadata("aureliumskills_spawner_mob")) {
Expand Down Expand Up @@ -79,8 +75,6 @@ public void onEntityDamage(EntityDamageByEntityEvent event) {
EntityType type = entity.getType();
if (blockXpGainPlayer(player)) return;
if (entity.equals(player)) return;
// Make sure not MythicMob
if (isMythicMob(entity)) return;
double health = entity.getHealth();
double damage = Math.min(health, event.getFinalDamage());
// Apply spawner multiplier
Expand Down

This file was deleted.

2 changes: 1 addition & 1 deletion src/main/resources/plugin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ main: com.archyx.aureliumskills.AureliumSkills
description: Feature-Packed Skills Plugin
author: Archyx
website: https://www.spigotmc.org/resources/aurelium-skills-advanced-skills-stats-abilities-and-more.81069/
softdepend: [WorldGuard, PlaceholderAPI, HolographicDisplays, Vault, ProtocolLib, MythicMobs, LuckPerms]
softdepend: [WorldGuard, PlaceholderAPI, HolographicDisplays, Vault, ProtocolLib, LuckPerms]
api-version: '1.13'
prefix: AureliumSkills

Expand Down

0 comments on commit 54ee1dc

Please sign in to comment.