Collection Tick Stack Traceability
This commit is contained in:
parent
ad529d7542
commit
e93f7c12d8
@ -18,6 +18,16 @@ public class AspectColl extends Coll<Aspect>
|
|||||||
{
|
{
|
||||||
super("massivecore_aspect", Aspect.class, MStore.getDb("default"), MassiveCore.get());
|
super("massivecore_aspect", Aspect.class, MStore.getDb("default"), MassiveCore.get());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// -------------------------------------------- //
|
||||||
|
// STACK TRACEABILITY
|
||||||
|
// -------------------------------------------- //
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onTick()
|
||||||
|
{
|
||||||
|
super.onTick();
|
||||||
|
}
|
||||||
|
|
||||||
// -------------------------------------------- //
|
// -------------------------------------------- //
|
||||||
// EXTRAS
|
// EXTRAS
|
||||||
|
45
src/com/massivecraft/massivecore/EngineCollTick.java
Normal file
45
src/com/massivecraft/massivecore/EngineCollTick.java
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
package com.massivecraft.massivecore;
|
||||||
|
|
||||||
|
import org.bukkit.plugin.Plugin;
|
||||||
|
|
||||||
|
import com.massivecraft.massivecore.store.Coll;
|
||||||
|
|
||||||
|
public class EngineCollTick extends EngineAbstract
|
||||||
|
{
|
||||||
|
// -------------------------------------------- //
|
||||||
|
// INSTANCE & CONSTRUCT
|
||||||
|
// -------------------------------------------- //
|
||||||
|
|
||||||
|
protected static EngineCollTick i = new EngineCollTick();
|
||||||
|
public static EngineCollTick get() { return i; }
|
||||||
|
|
||||||
|
// -------------------------------------------- //
|
||||||
|
// OVERRIDE: ENGINE
|
||||||
|
// -------------------------------------------- //
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Plugin getPlugin()
|
||||||
|
{
|
||||||
|
return MassiveCore.get();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Long getPeriod()
|
||||||
|
{
|
||||||
|
return 1L;
|
||||||
|
}
|
||||||
|
|
||||||
|
// -------------------------------------------- //
|
||||||
|
// OVERRIDE: RUNNABLE
|
||||||
|
// -------------------------------------------- //
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void run()
|
||||||
|
{
|
||||||
|
for (Coll<?> coll : Coll.getInstances())
|
||||||
|
{
|
||||||
|
coll.onTick();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -44,7 +44,6 @@ import com.massivecraft.massivecore.integration.vault.IntegrationVault;
|
|||||||
import com.massivecraft.massivecore.mixin.EngineTeleportMixinCause;
|
import com.massivecraft.massivecore.mixin.EngineTeleportMixinCause;
|
||||||
import com.massivecraft.massivecore.ps.PS;
|
import com.massivecraft.massivecore.ps.PS;
|
||||||
import com.massivecraft.massivecore.ps.PSAdapter;
|
import com.massivecraft.massivecore.ps.PSAdapter;
|
||||||
import com.massivecraft.massivecore.store.Coll;
|
|
||||||
import com.massivecraft.massivecore.store.ExamineThread;
|
import com.massivecraft.massivecore.store.ExamineThread;
|
||||||
import com.massivecraft.massivecore.teleport.EngineScheduledTeleport;
|
import com.massivecraft.massivecore.teleport.EngineScheduledTeleport;
|
||||||
import com.massivecraft.massivecore.util.IdUtil;
|
import com.massivecraft.massivecore.util.IdUtil;
|
||||||
@ -141,19 +140,6 @@ public class MassiveCore extends MassivePlugin
|
|||||||
private CmdMassiveCoreCmdurl outerCmdMassiveCoreCmdurl;
|
private CmdMassiveCoreCmdurl outerCmdMassiveCoreCmdurl;
|
||||||
public CmdMassiveCoreCmdurl getOuterCmdMassiveCoreCmdurl() { return this.outerCmdMassiveCoreCmdurl; }
|
public CmdMassiveCoreCmdurl getOuterCmdMassiveCoreCmdurl() { return this.outerCmdMassiveCoreCmdurl; }
|
||||||
|
|
||||||
// Runnables
|
|
||||||
// TODO: Make this one a singleton
|
|
||||||
private Runnable collTickTask = new Runnable()
|
|
||||||
{
|
|
||||||
public void run()
|
|
||||||
{
|
|
||||||
for (Coll<?> coll : Coll.getInstances())
|
|
||||||
{
|
|
||||||
coll.onTick();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
// -------------------------------------------- //
|
// -------------------------------------------- //
|
||||||
// OVERRIDE
|
// OVERRIDE
|
||||||
// -------------------------------------------- //
|
// -------------------------------------------- //
|
||||||
@ -178,7 +164,8 @@ public class MassiveCore extends MassivePlugin
|
|||||||
// Setup IdUtil
|
// Setup IdUtil
|
||||||
IdUtil.setup();
|
IdUtil.setup();
|
||||||
|
|
||||||
// Register events
|
// Engine
|
||||||
|
EngineCollTick.get().activate();
|
||||||
MassiveCoreEngineMain.get().activate();
|
MassiveCoreEngineMain.get().activate();
|
||||||
MassiveCoreEngineVariable.get().activate();
|
MassiveCoreEngineVariable.get().activate();
|
||||||
EngineScheduledTeleport.get().activate();
|
EngineScheduledTeleport.get().activate();
|
||||||
@ -187,9 +174,6 @@ public class MassiveCore extends MassivePlugin
|
|||||||
MassiveCoreEngineCommandRegistration.get().activate();
|
MassiveCoreEngineCommandRegistration.get().activate();
|
||||||
PlayerUtil.get().activate();
|
PlayerUtil.get().activate();
|
||||||
|
|
||||||
// Tasks
|
|
||||||
Bukkit.getScheduler().scheduleSyncRepeatingTask(this, this.collTickTask, 1, 1);
|
|
||||||
|
|
||||||
// Collections
|
// Collections
|
||||||
MultiverseColl.get().init();
|
MultiverseColl.get().init();
|
||||||
AspectColl.get().init();
|
AspectColl.get().init();
|
||||||
|
@ -16,6 +16,16 @@ public class MassiveCoreMConfColl extends Coll<MassiveCoreMConf>
|
|||||||
{
|
{
|
||||||
super("massivecore_mconf", MassiveCoreMConf.class, MStore.getDb(ConfServer.dburi), MassiveCore.get());
|
super("massivecore_mconf", MassiveCoreMConf.class, MStore.getDb(ConfServer.dburi), MassiveCore.get());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// -------------------------------------------- //
|
||||||
|
// STACK TRACEABILITY
|
||||||
|
// -------------------------------------------- //
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onTick()
|
||||||
|
{
|
||||||
|
super.onTick();
|
||||||
|
}
|
||||||
|
|
||||||
// -------------------------------------------- //
|
// -------------------------------------------- //
|
||||||
// OVERRIDE
|
// OVERRIDE
|
||||||
|
@ -15,6 +15,16 @@ public class MultiverseColl extends Coll<Multiverse>
|
|||||||
{
|
{
|
||||||
super("massivecore_multiverse", Multiverse.class, MStore.getDb("default"), MassiveCore.get());
|
super("massivecore_multiverse", Multiverse.class, MStore.getDb("default"), MassiveCore.get());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// -------------------------------------------- //
|
||||||
|
// STACK TRACEABILITY
|
||||||
|
// -------------------------------------------- //
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onTick()
|
||||||
|
{
|
||||||
|
super.onTick();
|
||||||
|
}
|
||||||
|
|
||||||
// -------------------------------------------- //
|
// -------------------------------------------- //
|
||||||
// EXTRAS
|
// EXTRAS
|
||||||
|
@ -33,6 +33,16 @@ public class SenderColl<E extends SenderEntity<E>> extends Coll<E> implements Se
|
|||||||
{
|
{
|
||||||
super(name, entityClass, db, plugin, true, true, true);
|
super(name, entityClass, db, plugin, true, true, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// -------------------------------------------- //
|
||||||
|
// STACK TRACEABILITY
|
||||||
|
// -------------------------------------------- //
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onTick()
|
||||||
|
{
|
||||||
|
super.onTick();
|
||||||
|
}
|
||||||
|
|
||||||
// -------------------------------------------- //
|
// -------------------------------------------- //
|
||||||
// OVERRIDE: Coll
|
// OVERRIDE: Coll
|
||||||
|
Loading…
Reference in New Issue
Block a user