Ensure recreation of faction flags and perms on getAll and every 3 seconds to allow for runtime database deletion without server crash.

This commit is contained in:
Olof Larsson
2014-11-19 11:24:36 +01:00
parent c058cd7ca5
commit f8d7e50828
7 changed files with 123 additions and 1 deletions

View File

@ -4,5 +4,18 @@ import com.massivecraft.massivecore.event.EventMassiveCore;
public abstract class EventFactionsAbstract extends EventMassiveCore
{
// -------------------------------------------- //
// CONSTRUCT
// -------------------------------------------- //
public EventFactionsAbstract()
{
}
public EventFactionsAbstract(boolean isAsync)
{
super(isAsync);
}
}

View File

@ -0,0 +1,32 @@
package com.massivecraft.factions.event;
import org.bukkit.event.HandlerList;
/**
* External plugins that add Faction flags should make sure they exist when this event is called.
*/
public class EventFactionsCreateFlags extends EventFactionsAbstract
{
// -------------------------------------------- //
// REQUIRED EVENT CODE
// -------------------------------------------- //
private static final HandlerList handlers = new HandlerList();
@Override public HandlerList getHandlers() { return handlers; }
public static HandlerList getHandlerList() { return handlers; }
// -------------------------------------------- //
// CONSTRUCT
// -------------------------------------------- //
public EventFactionsCreateFlags()
{
}
public EventFactionsCreateFlags(boolean isAsync)
{
super(isAsync);
}
}

View File

@ -0,0 +1,18 @@
package com.massivecraft.factions.event;
import org.bukkit.event.HandlerList;
/**
* External plugins that add Faction perms should make sure they exist when this event is called.
*/
public class EventFactionsCreatePerms extends EventFactionsAbstract
{
// -------------------------------------------- //
// REQUIRED EVENT CODE
// -------------------------------------------- //
private static final HandlerList handlers = new HandlerList();
@Override public HandlerList getHandlers() { return handlers; }
public static HandlerList getHandlerList() { return handlers; }
}