2021-05-13 12:11:59 +00:00
|
|
|
package com.alttd.chat;
|
2021-05-10 08:01:35 +00:00
|
|
|
|
|
|
|
|
import net.luckperms.api.LuckPerms;
|
|
|
|
|
import net.luckperms.api.LuckPermsProvider;
|
|
|
|
|
|
2021-05-13 12:11:29 +00:00
|
|
|
import java.util.UUID;
|
2021-05-10 08:57:26 +00:00
|
|
|
|
2021-05-10 08:01:35 +00:00
|
|
|
public class ChatImplementation implements ChatAPI{
|
|
|
|
|
|
2021-05-15 10:34:19 +00:00
|
|
|
private static ChatAPI instance;
|
2021-05-10 08:01:35 +00:00
|
|
|
|
|
|
|
|
private LuckPerms luckPerms;
|
|
|
|
|
|
2021-05-13 12:11:29 +00:00
|
|
|
public ChatImplementation() {
|
2021-05-10 08:35:47 +00:00
|
|
|
instance = this;
|
2021-05-13 18:27:20 +00:00
|
|
|
|
|
|
|
|
luckPerms = getLuckPerms();
|
2021-05-15 19:16:01 +00:00
|
|
|
|
2021-05-10 08:01:35 +00:00
|
|
|
}
|
|
|
|
|
|
2021-05-15 10:34:19 +00:00
|
|
|
public static ChatAPI get() {
|
2021-05-10 08:35:47 +00:00
|
|
|
if(instance == null)
|
|
|
|
|
instance = new ChatImplementation();
|
|
|
|
|
return instance;
|
|
|
|
|
}
|
|
|
|
|
|
2021-05-10 08:01:35 +00:00
|
|
|
@Override
|
|
|
|
|
public LuckPerms getLuckPerms() {
|
|
|
|
|
if(luckPerms == null)
|
|
|
|
|
luckPerms = LuckPermsProvider.get();
|
|
|
|
|
return luckPerms;
|
|
|
|
|
}
|
2021-05-10 08:35:47 +00:00
|
|
|
|
2021-05-13 12:11:29 +00:00
|
|
|
@Override
|
|
|
|
|
public String getPrefix(UUID uuid) {
|
2021-05-24 08:10:02 +00:00
|
|
|
return "";
|
2021-05-13 12:11:29 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public String getPrefix(UUID uuid, boolean all) {
|
2021-05-24 08:10:02 +00:00
|
|
|
return "";
|
2021-05-13 12:11:29 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public String getStaffPrefix(UUID uuid) {
|
|
|
|
|
return "";
|
|
|
|
|
}
|
|
|
|
|
|
2021-05-10 08:35:47 +00:00
|
|
|
|
2021-05-10 08:01:35 +00:00
|
|
|
}
|