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:
@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
}
|
@ -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; }
|
||||
|
||||
}
|
Reference in New Issue
Block a user