mirror of
https://github.com/songoda/EpicHoppers.git
synced 2024-11-05 18:19:38 +01:00
Merge branch 'development'
This commit is contained in:
commit
0a591416e5
2
pom.xml
2
pom.xml
@ -2,7 +2,7 @@
|
|||||||
<groupId>com.songoda</groupId>
|
<groupId>com.songoda</groupId>
|
||||||
<artifactId>EpicHoppers</artifactId>
|
<artifactId>EpicHoppers</artifactId>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<version>4.6.10</version>
|
<version>4.6.11</version>
|
||||||
<build>
|
<build>
|
||||||
<defaultGoal>clean install</defaultGoal>
|
<defaultGoal>clean install</defaultGoal>
|
||||||
<finalName>EpicHoppers-${project.version}</finalName>
|
<finalName>EpicHoppers-${project.version}</finalName>
|
||||||
|
@ -23,6 +23,7 @@ import com.songoda.epichoppers.hopper.*;
|
|||||||
import com.songoda.epichoppers.hopper.levels.Level;
|
import com.songoda.epichoppers.hopper.levels.Level;
|
||||||
import com.songoda.epichoppers.hopper.levels.LevelManager;
|
import com.songoda.epichoppers.hopper.levels.LevelManager;
|
||||||
import com.songoda.epichoppers.hopper.levels.modules.*;
|
import com.songoda.epichoppers.hopper.levels.modules.*;
|
||||||
|
import com.songoda.epichoppers.hopper.levels.modules.Module;
|
||||||
import com.songoda.epichoppers.listeners.*;
|
import com.songoda.epichoppers.listeners.*;
|
||||||
import com.songoda.epichoppers.player.PlayerDataManager;
|
import com.songoda.epichoppers.player.PlayerDataManager;
|
||||||
import com.songoda.epichoppers.settings.Settings;
|
import com.songoda.epichoppers.settings.Settings;
|
||||||
@ -44,6 +45,7 @@ import org.bukkit.inventory.meta.ItemMeta;
|
|||||||
import org.bukkit.plugin.PluginManager;
|
import org.bukkit.plugin.PluginManager;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
import java.lang.reflect.InvocationTargetException;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
|
||||||
|
|
||||||
@ -61,7 +63,6 @@ public class EpicHoppers extends SongodaPlugin {
|
|||||||
private TeleportHandler teleportHandler;
|
private TeleportHandler teleportHandler;
|
||||||
|
|
||||||
private DatabaseConnector databaseConnector;
|
private DatabaseConnector databaseConnector;
|
||||||
private DataMigrationManager dataMigrationManager;
|
|
||||||
private DataManager dataManager;
|
private DataManager dataManager;
|
||||||
|
|
||||||
private boolean liquidtanks = false;
|
private boolean liquidtanks = false;
|
||||||
@ -116,9 +117,9 @@ public class EpicHoppers extends SongodaPlugin {
|
|||||||
this.getLogger().info("Data handler connected using SQLite.");
|
this.getLogger().info("Data handler connected using SQLite.");
|
||||||
|
|
||||||
this.dataManager = new DataManager(this.databaseConnector, this);
|
this.dataManager = new DataManager(this.databaseConnector, this);
|
||||||
this.dataMigrationManager = new DataMigrationManager(this.databaseConnector, this.dataManager,
|
DataMigrationManager dataMigrationManager = new DataMigrationManager(this.databaseConnector, this.dataManager,
|
||||||
new _1_InitialMigration());
|
new _1_InitialMigration());
|
||||||
this.dataMigrationManager.runMigrations();
|
dataMigrationManager.runMigrations();
|
||||||
|
|
||||||
this.loadLevelManager();
|
this.loadLevelManager();
|
||||||
Bukkit.getScheduler().runTaskLaterAsynchronously(this, () -> {
|
Bukkit.getScheduler().runTaskLaterAsynchronously(this, () -> {
|
||||||
@ -228,15 +229,6 @@ public class EpicHoppers extends SongodaPlugin {
|
|||||||
pluginManager.registerEvents(new InteractListeners(this), this);
|
pluginManager.registerEvents(new InteractListeners(this), this);
|
||||||
pluginManager.registerEvents(new InventoryListeners(), this);
|
pluginManager.registerEvents(new InventoryListeners(), this);
|
||||||
|
|
||||||
if (pluginManager.isPluginEnabled("FabledSkyBlock")) {
|
|
||||||
try {
|
|
||||||
SkyBlock.getInstance().getPermissionManager().registerPermission(
|
|
||||||
(BasicPermission) Class.forName("com.songoda.epichoppers.compatibility.EpicHoppersPermission").newInstance());
|
|
||||||
} catch (ClassNotFoundException | InstantiationException | IllegalAccessException e) {
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Check for liquid tanks
|
// Check for liquid tanks
|
||||||
if (pluginManager.isPluginEnabled("LiquidTanks")) liquidtanks = true;
|
if (pluginManager.isPluginEnabled("LiquidTanks")) liquidtanks = true;
|
||||||
|
|
||||||
@ -246,6 +238,18 @@ public class EpicHoppers extends SongodaPlugin {
|
|||||||
// Start auto save
|
// Start auto save
|
||||||
int saveInterval = Settings.AUTOSAVE.getInt() * 60 * 20;
|
int saveInterval = Settings.AUTOSAVE.getInt() * 60 * 20;
|
||||||
Bukkit.getScheduler().runTaskTimerAsynchronously(this, this::saveModules, saveInterval, saveInterval);
|
Bukkit.getScheduler().runTaskTimerAsynchronously(this, this::saveModules, saveInterval, saveInterval);
|
||||||
|
|
||||||
|
// Hotfix for EH loading before FSB
|
||||||
|
Bukkit.getScheduler().runTask(this, () -> {
|
||||||
|
if (pluginManager.isPluginEnabled("FabledSkyBlock")) {
|
||||||
|
try {
|
||||||
|
SkyBlock.getInstance().getPermissionManager().registerPermission(
|
||||||
|
(BasicPermission) Class.forName("com.songoda.epichoppers.compatibility.EpicHoppersPermission").getDeclaredConstructor().newInstance());
|
||||||
|
} catch (ClassNotFoundException | InstantiationException | IllegalAccessException | NoSuchMethodException | InvocationTargetException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Loading…
Reference in New Issue
Block a user