本文整理了Java中org.bukkit.Server.getBukkitVersion()
方法的一些代码示例,展示了Server.getBukkitVersion()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Server.getBukkitVersion()
方法的具体详情如下:
包路径:org.bukkit.Server
类名称:Server
方法名:getBukkitVersion
[英]Gets the Bukkit version that this server is running.
[中]获取此服务器正在运行的Bukkit版本。
代码示例来源:origin: Bukkit/Bukkit
/**
* @see Server#getBukkitVersion()
*/
public static String getBukkitVersion() {
return server.getBukkitVersion();
}
代码示例来源:origin: SpigotMC/Spigot-API
/**
* @see Server#getBukkitVersion()
*/
public static String getBukkitVersion() {
return server.getBukkitVersion();
}
代码示例来源:origin: EngineHub/CommandHelper
@Override
public String getAPIVersion() {
return s.getBukkitVersion();
}
代码示例来源:origin: EngineHub/CommandHelper
@Override
public MCVersion getMinecraftVersion() {
if(version == null) {
int temp = s.getBukkitVersion().indexOf('-');
version = MCVersion.match(s.getBukkitVersion().substring(0, temp).split("\\."));
}
return version;
}
代码示例来源:origin: io.github.bedwarsrel/BedwarsRel-Common
public static String getBukkitVersion() {
return BedwarsRel.getInstance().getServer().getBukkitVersion();
}
代码示例来源:origin: BedwarsRel/BedwarsRel
public static String getBukkitVersion() {
return BedwarsRel.getInstance().getServer().getBukkitVersion();
}
代码示例来源:origin: AddstarMC/Minigames
private int checkVersion(){
InputStream stream = this.getResource("minigame.properties");
Properties p = new Properties();
try {
p.load(stream );
} catch ( NullPointerException | IOException e ) {
getLogger().warning(e.getMessage());
} finally {
Closeables.closeQuietly( stream );
}
if(p.containsKey("version")) {
VERSION = new ComparableVersion(p.getProperty("version"));
SPIGOT_VERSION = new ComparableVersion(p.getProperty("spigot_version"));
ComparableVersion serverversion = new ComparableVersion(getServer().getBukkitVersion());
return SPIGOT_VERSION.compareTo(serverversion);
}else return 1;
}
代码示例来源:origin: Rsl1122/Plan-PlayerAnalytics
public BukkitServerProperties(Server server) {
super(
server.getServerId(),
server.getName(),
server.getPort(),
server.getVersion(),
server.getBukkitVersion(),
server::getIp,
server.getMaxPlayers(),
() -> server.getOnlinePlayers().size()
);
}
代码示例来源:origin: aadnk/ProtocolLib
pw.println("Bukkit Version: " + plugin.getServer().getBukkitVersion());
pw.println("Server Version: " + plugin.getServer().getVersion());
pw.println("Java Version: " + System.getProperty("java.version"));
代码示例来源:origin: Rsl1122/Plan-PlayerAnalytics
public PlanBukkitMocker withServer() {
Server serverMock = Mockito.mock(Server.class);
doReturn("").when(serverMock).getIp();
doReturn("Bukkit").when(serverMock).getName();
doReturn("Bukkit").when(serverMock).getServerName();
doReturn(25565).when(serverMock).getPort();
doReturn("1.12.2").when(serverMock).getVersion();
doReturn("32423").when(serverMock).getBukkitVersion();
Mockito.doReturn(TestConstants.BUKKIT_MAX_PLAYERS).when(serverMock).getMaxPlayers();
ConsoleCommandSender sender = Mockito.mock(ConsoleCommandSender.class);
doReturn(sender).when(serverMock).getConsoleSender();
BukkitScheduler bukkitScheduler = Mockito.mock(BukkitScheduler.class);
doReturn(bukkitScheduler).when(serverMock).getScheduler();
doReturn(serverMock).when(planMock).getServer();
return this;
}
代码示例来源:origin: NoCheatPlus/NoCheatPlus
server.getBukkitVersion(),
server.getVersion(),
ServerVersion.fetchNMSMinecraftServerVersion()
代码示例来源:origin: EngineHub/WorldGuard
append("Bukkit Version", server.getBukkitVersion());
append("Implementation", server.getVersion());
append("Player Count", "%d/%d", Bukkit.getOnlinePlayers().size(), server.getMaxPlayers());
代码示例来源:origin: BentoBoxWorld/BentoBox
if (result == null) {
ServerVersion version = getServerVersion(plugin.getServer().getBukkitVersion());
内容来源于网络,如有侵权,请联系作者删除!