Start working on the API before adding the server implementation
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
package com.alttd.chat;
|
||||
|
||||
import net.luckperms.api.LuckPerms;
|
||||
|
||||
public interface ChatAPI {
|
||||
|
||||
/*public static ChatAPI get() {
|
||||
return ChatImplementation.INSTANCE;
|
||||
}*/
|
||||
|
||||
LuckPerms getLuckPerms();
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
package com.alttd.chat;
|
||||
|
||||
import net.luckperms.api.LuckPerms;
|
||||
import net.luckperms.api.LuckPermsProvider;
|
||||
|
||||
public class ChatImplementation implements ChatAPI{
|
||||
|
||||
//public static final ChatAPI INSTANCE = new ChatImplementation();
|
||||
|
||||
private LuckPerms luckPerms;
|
||||
|
||||
ChatImplementation() {
|
||||
// init database
|
||||
// init depends//or set them the first time they are called?
|
||||
}
|
||||
|
||||
@Override
|
||||
public LuckPerms getLuckPerms() {
|
||||
if(luckPerms == null)
|
||||
luckPerms = LuckPermsProvider.get();
|
||||
return luckPerms;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user