mirror of
https://github.com/Auxilor/EcoMobs.git
synced 2025-12-22 00:19:30 +00:00
Added extension support
This commit is contained in:
@@ -43,6 +43,15 @@ public class EcoBossesPlugin extends EcoPlugin {
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void enable() {
|
public void enable() {
|
||||||
|
this.getExtensionLoader().loadExtensions();
|
||||||
|
|
||||||
|
if (this.getExtensionLoader().getLoadedExtensions().isEmpty()) {
|
||||||
|
this.getLogger().info("&cNo extensions found");
|
||||||
|
} else {
|
||||||
|
this.getLogger().info("Extensions Loaded:");
|
||||||
|
this.getExtensionLoader().getLoadedExtensions().forEach(extension -> this.getLogger().info("- " + extension.getName() + " v" + extension.getVersion()));
|
||||||
|
}
|
||||||
|
|
||||||
this.getScheduler().runTimer(new AutoSpawnTimer(), 5, 1);
|
this.getScheduler().runTimer(new AutoSpawnTimer(), 5, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -51,6 +60,8 @@ public class EcoBossesPlugin extends EcoPlugin {
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void disable() {
|
public void disable() {
|
||||||
|
this.getExtensionLoader().unloadExtensions();
|
||||||
|
|
||||||
for (EcoBoss boss : EcoBosses.values()) {
|
for (EcoBoss boss : EcoBosses.values()) {
|
||||||
for (UUID uuid : boss.getLivingBosses().keySet()) {
|
for (UUID uuid : boss.getLivingBosses().keySet()) {
|
||||||
LivingEntity entity = (LivingEntity) Bukkit.getEntity(uuid);
|
LivingEntity entity = (LivingEntity) Bukkit.getEntity(uuid);
|
||||||
|
|||||||
Reference in New Issue
Block a user