mirror of
https://github.com/songoda/UltimateRepairing.git
synced 2024-11-01 00:10:19 +01:00
Merge branch 'development'
This commit is contained in:
commit
f5d4e3c8ea
6
pom.xml
6
pom.xml
@ -2,7 +2,7 @@
|
||||
<groupId>com.songoda</groupId>
|
||||
<artifactId>UltimateRepairing</artifactId>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<version>1.4.3</version>
|
||||
<version>1.4.3b</version>
|
||||
<build>
|
||||
<defaultGoal>clean install</defaultGoal>
|
||||
<finalName>UltimateRepairing-${project.version}</finalName>
|
||||
@ -82,11 +82,11 @@
|
||||
<repositories>
|
||||
<repository>
|
||||
<id>private</id>
|
||||
<url>http://repo.songoda.com/artifactory/private/</url>
|
||||
<url>http://repo.songoda.com/repository/private/</url>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>public</id>
|
||||
<url>https://repo.songoda.com/artifactory/public/</url>
|
||||
<url>https://repo.songoda.com/repository/public/</url>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>spigot-repo</id>
|
||||
|
@ -78,24 +78,6 @@ public class UltimateRepairing extends SongodaPlugin {
|
||||
new CommandSettings(guiManager));
|
||||
this.commandManager.addCommand(new CommandURAnvil());
|
||||
|
||||
Bukkit.getScheduler().runTaskLaterAsynchronously(this, () -> {
|
||||
/*
|
||||
* Register anvils into AnvilManager from Configuration.
|
||||
*/
|
||||
dataFile.load();
|
||||
if (dataFile.contains("data")) {
|
||||
for (String key : dataFile.getConfigurationSection("data").getKeys(false)) {
|
||||
Location location = Methods.unserializeLocation(key);
|
||||
UAnvil anvil = anvilManager.getAnvil(location);
|
||||
anvil.setHologram(dataFile.getBoolean("data." + key + ".hologram"));
|
||||
anvil.setInfinity(dataFile.getBoolean("data." + key + ".infinity"));
|
||||
anvil.setParticles(dataFile.getBoolean("data." + key + ".particles"));
|
||||
anvil.setPermPlaced(dataFile.getBoolean("data." + key + ".permPlaced"));
|
||||
}
|
||||
}
|
||||
particleTask.start();
|
||||
}, 6L);
|
||||
|
||||
// Event registration
|
||||
guiManager.init();
|
||||
pluginManager.registerEvents(new PlayerListeners(this), this);
|
||||
@ -106,6 +88,25 @@ public class UltimateRepairing extends SongodaPlugin {
|
||||
Bukkit.getScheduler().runTaskTimerAsynchronously(this, this::saveToFile, 6000, 6000);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDataLoad() {
|
||||
/*
|
||||
* Register anvils into AnvilManager from Configuration.
|
||||
*/
|
||||
dataFile.load();
|
||||
if (dataFile.contains("data")) {
|
||||
for (String key : dataFile.getConfigurationSection("data").getKeys(false)) {
|
||||
Location location = Methods.unserializeLocation(key);
|
||||
UAnvil anvil = anvilManager.getAnvil(location);
|
||||
anvil.setHologram(dataFile.getBoolean("data." + key + ".hologram"));
|
||||
anvil.setInfinity(dataFile.getBoolean("data." + key + ".infinity"));
|
||||
anvil.setParticles(dataFile.getBoolean("data." + key + ".particles"));
|
||||
anvil.setPermPlaced(dataFile.getBoolean("data." + key + ".permPlaced"));
|
||||
}
|
||||
}
|
||||
particleTask.start();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPluginDisable() {
|
||||
saveConfig();
|
||||
|
Loading…
Reference in New Issue
Block a user