PermissionsManager.java
1.32 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
package com.mumfrey.liteloader.permissions;
import com.mumfrey.liteloader.Permissible;
import com.mumfrey.liteloader.common.GameEngine;
/**
* Interface for permissions manager implementations
*
* @author Adam Mummery-Smith
*/
public interface PermissionsManager
{
/**
* Get the underlying permissions node for this manager for the specified mod
*
* @param mod Mod to fetch permissions for
*/
public abstract Permissions getPermissions(Permissible mod);
/**
* Get the time the permissions for the specified mod were last updated
*
* @param mod Mod to check for
* @return Timestamp when the permissions were last updated
*/
public abstract Long getPermissionUpdateTime(Permissible mod);
/**
* Handler for tick event
*
* @param engine
* @param partialTicks
* @param inGame
*/
public abstract void onTick(GameEngine<?, ?> engine, float partialTicks, boolean inGame);
/**
* Register a new event listener, the registered object will receive callbacks for permissions events
*
* @param permissible
*/
public abstract void registerPermissible(Permissible permissible);
/**
* Perform any necessary validation to check for a tamper condition, can and should be called from as
* many places as possible
*/
public abstract void tamperCheck();
}