mirror of
https://github.com/DRE2N/DungeonsXL.git
synced 2024-11-24 19:45:43 +01:00
Move announcer task initialization to main class
This commit is contained in:
parent
a227d8628d
commit
b7bc91fd68
@ -69,7 +69,7 @@ Instead of referencing the internals of the implementation directly, DungeonsXL
|
||||
The shaded version of DXL (standard version) contains this library, while the original version needs it as an external plugin.
|
||||
Have a look at the [installation instructions](../../wiki/getting-started#installation) for detailed information.
|
||||
|
||||
DungeonsXL currently uses BRCommons 0.6.2.
|
||||
DungeonsXL currently uses BRCommons 0.6.3.
|
||||
|
||||
### Java
|
||||
7 and higher
|
||||
|
2
pom.xml
2
pom.xml
@ -67,7 +67,7 @@
|
||||
<dependency>
|
||||
<groupId>io.github.dre2n</groupId>
|
||||
<artifactId>commons</artifactId>
|
||||
<version>0.6.2</version>
|
||||
<version>0.6.3</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.github.dre2n</groupId>
|
||||
|
@ -42,6 +42,7 @@ import io.github.dre2n.dungeonsxl.requirement.RequirementTypes;
|
||||
import io.github.dre2n.dungeonsxl.reward.DLootInventory;
|
||||
import io.github.dre2n.dungeonsxl.reward.RewardTypes;
|
||||
import io.github.dre2n.dungeonsxl.sign.DSignTypes;
|
||||
import io.github.dre2n.dungeonsxl.task.AnnouncerTask;
|
||||
import io.github.dre2n.dungeonsxl.task.LazyUpdateTask;
|
||||
import io.github.dre2n.dungeonsxl.task.SecureModeTask;
|
||||
import io.github.dre2n.dungeonsxl.task.UpdateTask;
|
||||
@ -85,6 +86,7 @@ public class DungeonsXL extends BRPlugin {
|
||||
private DPlayers dPlayers;
|
||||
private Announcers announcers;
|
||||
|
||||
private BukkitTask announcerTask;
|
||||
private BukkitTask worldUnloadTask;
|
||||
private BukkitTask lazyUpdateTask;
|
||||
private BukkitTask updateTask;
|
||||
@ -155,6 +157,7 @@ public class DungeonsXL extends BRPlugin {
|
||||
loadAll();
|
||||
|
||||
// Tasks
|
||||
startAnnouncerTsak(200L);
|
||||
startWorldUnloadTask(1200L);
|
||||
startLazyUpdateTask(20L);
|
||||
startUpdateTask(20L);
|
||||
@ -501,6 +504,20 @@ public class DungeonsXL extends BRPlugin {
|
||||
return worldUnloadTask;
|
||||
}
|
||||
|
||||
/**
|
||||
* start a new AnnouncerTask
|
||||
*/
|
||||
public void startAnnouncerTask(long period) {
|
||||
announcerTask = new AnnouncerTask(announcers).runTaskTimer(this, 0L, period);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the AnnouncerTask
|
||||
*/
|
||||
public BukkitTask getAnnouncerTask() {
|
||||
return announcerTask;
|
||||
}
|
||||
|
||||
/**
|
||||
* start a new WorldUnloadTask
|
||||
*/
|
||||
|
@ -53,8 +53,6 @@ public class Announcers {
|
||||
announcers.add(new Announcer(name, description, worlds, identifier, multiFloor, maxGroupsPerGame, maxPlayersPerGroup));
|
||||
}
|
||||
}
|
||||
|
||||
new AnnouncerTask(this).runTaskTimer(DungeonsXL.getInstance(), 0, 200);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user