mirror of
https://github.com/LuckPerms/LuckPerms.git
synced 2024-11-24 11:38:40 +01:00
Add server version info to the startup banner
This commit is contained in:
parent
d18ac2e6eb
commit
f5007f94dc
@ -454,7 +454,7 @@ public class LPBukkitPlugin extends JavaPlugin implements LuckPermsPlugin {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getServerVersion() {
|
public String getServerVersion() {
|
||||||
return getServer().getVersion();
|
return getServer().getVersion() + " - " + getServer().getBukkitVersion();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -390,6 +390,7 @@ public interface LuckPermsPlugin {
|
|||||||
sender.sendMessage(Util.color("&b |___ \\__/ \\__, | \\ &3| |___ | \\ | | .__/ "));
|
sender.sendMessage(Util.color("&b |___ \\__/ \\__, | \\ &3| |___ | \\ | | .__/ "));
|
||||||
sender.sendMessage(Util.color(" "));
|
sender.sendMessage(Util.color(" "));
|
||||||
sender.sendMessage(Util.color("&2 Loading version &bv" + plugin.getVersion() + "&2 on " + plugin.getServerType().getFriendlyName() + " - " + plugin.getServerName()));
|
sender.sendMessage(Util.color("&2 Loading version &bv" + plugin.getVersion() + "&2 on " + plugin.getServerType().getFriendlyName() + " - " + plugin.getServerName()));
|
||||||
|
sender.sendMessage(Util.color("&8 Running on server version " + plugin.getServerVersion()));
|
||||||
sender.sendMessage(Util.color(" "));
|
sender.sendMessage(Util.color(" "));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -77,6 +77,7 @@ import me.lucko.luckperms.sponge.utils.VersionData;
|
|||||||
|
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.spongepowered.api.Game;
|
import org.spongepowered.api.Game;
|
||||||
|
import org.spongepowered.api.Platform;
|
||||||
import org.spongepowered.api.Sponge;
|
import org.spongepowered.api.Sponge;
|
||||||
import org.spongepowered.api.command.CommandManager;
|
import org.spongepowered.api.command.CommandManager;
|
||||||
import org.spongepowered.api.config.ConfigDir;
|
import org.spongepowered.api.config.ConfigDir;
|
||||||
@ -406,12 +407,15 @@ public class LPSpongePlugin implements LuckPermsPlugin {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getServerName() {
|
public String getServerName() {
|
||||||
return getGame().getPlatform().getImplementation().getDescription().orElse("null");
|
return getGame().getPlatform().getContainer(Platform.Component.IMPLEMENTATION).getName();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getServerVersion() {
|
public String getServerVersion() {
|
||||||
return getGame().getPlatform().getApi().getVersion().orElse("null") + " - " + getGame().getPlatform().getImplementation().getVersion().orElse("null");
|
return getGame().getPlatform().getContainer(Platform.Component.API).getName() + ": " +
|
||||||
|
getGame().getPlatform().getContainer(Platform.Component.API).getVersion().orElse("null") + " - " +
|
||||||
|
getGame().getPlatform().getContainer(Platform.Component.IMPLEMENTATION).getName() + ": " +
|
||||||
|
getGame().getPlatform().getContainer(Platform.Component.IMPLEMENTATION).getVersion().orElse("null");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Loading…
Reference in New Issue
Block a user