mirror of
https://gitlab.com/phoenix-dvpmt/mmocore.git
synced 2024-11-23 00:05:52 +01:00
support for mythiclib 1.3.4
This commit is contained in:
parent
e4aaf1351a
commit
a26fcf28c6
10
pom.xml
10
pom.xml
@ -4,7 +4,7 @@
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>net.Indyuce</groupId>
|
||||
<artifactId>MMOCore</artifactId>
|
||||
<version>1.9.4</version>
|
||||
<version>1.9.5</version>
|
||||
<name>MMOCore</name>
|
||||
<description>Offer your players a brand new RPG experience!!</description>
|
||||
|
||||
@ -125,12 +125,6 @@
|
||||
</dependency>
|
||||
|
||||
<!-- Extra libs -->
|
||||
<dependency>
|
||||
<groupId>org.jetbrains</groupId>
|
||||
<artifactId>annotations</artifactId>
|
||||
<version>19.0.0</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.papermc</groupId>
|
||||
@ -149,7 +143,7 @@
|
||||
<dependency>
|
||||
<groupId>io.lumine</groupId>
|
||||
<artifactId>MythicLib-dist</artifactId>
|
||||
<version>1.3.3</version>
|
||||
<version>1.3.4</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
|
@ -2,9 +2,8 @@ package net.Indyuce.mmocore;
|
||||
|
||||
import io.lumine.mythic.lib.MythicLib;
|
||||
import io.lumine.mythic.lib.UtilityMethods;
|
||||
import io.lumine.mythic.lib.comp.Metrics;
|
||||
import io.lumine.mythic.lib.metrics.bukkit.Metrics;
|
||||
import io.lumine.mythic.lib.version.SpigotPlugin;
|
||||
import io.lumine.mythic.utils.plugin.LuminePlugin;
|
||||
import net.Indyuce.mmocore.comp.citizens.CitizenInteractEventListener;
|
||||
import net.Indyuce.mmocore.comp.citizens.CitizensMMOLoader;
|
||||
import net.Indyuce.mmocore.comp.mythicmobs.MythicHook;
|
||||
@ -57,6 +56,7 @@ import org.bukkit.Bukkit;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.command.CommandMap;
|
||||
import org.bukkit.configuration.file.FileConfiguration;
|
||||
import org.bukkit.plugin.java.JavaPlugin;
|
||||
import org.bukkit.scheduler.BukkitRunnable;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.spigotmc.SpigotConfig;
|
||||
@ -65,7 +65,7 @@ import java.io.File;
|
||||
import java.lang.reflect.Field;
|
||||
import java.util.logging.Level;
|
||||
|
||||
public class MMOCore extends LuminePlugin {
|
||||
public class MMOCore extends JavaPlugin {
|
||||
public static MMOCore plugin;
|
||||
|
||||
public final WaypointManager waypointManager = new WaypointManager();
|
||||
@ -115,7 +115,8 @@ public class MMOCore extends LuminePlugin {
|
||||
plugin = this;
|
||||
}
|
||||
|
||||
public void load() {
|
||||
@Override
|
||||
public void onLoad() {
|
||||
|
||||
// Register MMOCore-specific objects
|
||||
MythicLib.plugin.getEntities().registerRestriction(new MMOCoreTargetRestriction());
|
||||
@ -140,7 +141,8 @@ public class MMOCore extends LuminePlugin {
|
||||
loadManager.registerLoader(new MythicMobsMMOLoader());
|
||||
}
|
||||
|
||||
public void enable() {
|
||||
@Override
|
||||
public void onEnable() {
|
||||
new SpigotPlugin(70575, this).checkForUpdate();
|
||||
new Metrics(this);
|
||||
saveDefaultConfig();
|
||||
|
@ -3,9 +3,8 @@ package net.Indyuce.mmocore.api.util;
|
||||
import com.google.gson.JsonArray;
|
||||
import com.google.gson.JsonObject;
|
||||
import io.lumine.mythic.lib.MythicLib;
|
||||
import io.lumine.mythic.lib.hologram.Hologram;
|
||||
import io.lumine.mythic.lib.version.VersionMaterial;
|
||||
import io.lumine.mythic.utils.holograms.Hologram;
|
||||
import io.lumine.mythic.utils.serialize.Position;
|
||||
import net.Indyuce.mmocore.MMOCore;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.Location;
|
||||
@ -64,8 +63,7 @@ public class MMOCoreUtils {
|
||||
* @param message Message to display
|
||||
*/
|
||||
public static void displayIndicator(Location loc, String message) {
|
||||
Hologram holo = Hologram.create(Position.of(loc), Arrays.asList(message));
|
||||
holo.spawn();
|
||||
Hologram holo = Hologram.create(loc, Arrays.asList(message));
|
||||
Bukkit.getScheduler().runTaskLater(MMOCore.plugin, () -> holo.despawn(), 20);
|
||||
}
|
||||
|
||||
|
@ -5,7 +5,7 @@ import net.Indyuce.mmocore.experience.dispenser.ExperienceDispenser;
|
||||
import net.Indyuce.mmocore.experience.source.type.SpecificExperienceSource;
|
||||
import net.Indyuce.mmocore.manager.profession.ExperienceSourceManager;
|
||||
import net.Indyuce.mmocore.api.player.PlayerData;
|
||||
import org.apache.commons.lang3.Validate;
|
||||
import org.apache.commons.lang.Validate;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.OfflinePlayer;
|
||||
import org.bukkit.entity.Player;
|
||||
|
@ -2,7 +2,6 @@ package net.Indyuce.mmocore.listener;
|
||||
|
||||
import io.lumine.mythic.lib.MythicLib;
|
||||
import io.lumine.mythic.lib.UtilityMethods;
|
||||
import io.lumine.mythic.utils.Schedulers;
|
||||
import net.Indyuce.mmocore.MMOCore;
|
||||
import net.Indyuce.mmocore.api.block.BlockInfo;
|
||||
import net.Indyuce.mmocore.api.block.VanillaBlockType;
|
||||
@ -137,7 +136,7 @@ public class BlockListener implements Listener {
|
||||
* Finally enable block regen.
|
||||
*/
|
||||
if (info.hasRegen())
|
||||
Schedulers.sync().runLater(() -> MMOCore.plugin.mineManager.initialize(info.startRegeneration(Bukkit.createBlockData(savedData), block.getLocation()), !temporaryBlock), 1);
|
||||
Bukkit.getScheduler().runTaskLater(MythicLib.plugin, () -> MMOCore.plugin.mineManager.initialize(info.startRegeneration(Bukkit.createBlockData(savedData), block.getLocation()), !temporaryBlock), 1);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user