Partially add migration support
This commit is contained in:
@@ -190,6 +190,11 @@ public class LPSpongePlugin implements LuckPermsPlugin {
|
||||
return "null";
|
||||
}
|
||||
|
||||
@Override
|
||||
public Type getType() {
|
||||
return Type.SPONGE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Message getPlayerStatus(UUID uuid) {
|
||||
return game.getServer().getPlayer(getUuidCache().getExternalUUID(uuid)).isPresent() ? Message.PLAYER_ONLINE : Message.PLAYER_OFFLINE;
|
||||
@@ -224,6 +229,21 @@ public class LPSpongePlugin implements LuckPermsPlugin {
|
||||
return p.get().getDescriptions().stream().map(PermissionDescription::getId).collect(Collectors.toList());
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getPlugin(String name) {
|
||||
return game.getPluginManager().getPlugin(name).get().getInstance().get();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getService(Class clazz) {
|
||||
return Sponge.getServiceManager().provideUnchecked(clazz);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isPluginLoaded(String name) {
|
||||
return game.getPluginManager().isLoaded(name);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void runUpdateTask() {
|
||||
scheduler.createTaskBuilder().async().execute(new UpdateTask(this)).submit(LPSpongePlugin.this);
|
||||
|
||||
Reference in New Issue
Block a user