Untitled

mail@pastecode.io avatar
unknown
plain_text
2 years ago
486 B
3
Indexable
Never
String version = Bukkit.getVersion();
String[] splitv = version.split(":");
version = splitv[1].replace(")","").replace(" ", "");

String[] checkup = version.split("\\.");
List<String> versions = new ArrayList<String>();

for(int i = 16; i <= 18; i++){
    versions.add(String.valueOf(i));
}

for (String list:versions) {
    if(!list.equalsIgnoreCase(checkup[1])) getLogger().log(Level.SEVERE, "Die Version des Servers passt nicht");
    else this.Version = checkup[1];
}