Fetch CraftServer#unrestrictedAdvancements only in MC 12
This commit is contained in:
parent
08d3b564e4
commit
38c7a14d0e
2 changed files with 8 additions and 4 deletions
|
|
@ -39,7 +39,7 @@ public class RCraftServer {
|
|||
fieldOf("console", ALL_VERSIONS),
|
||||
fieldOf("commandsConfiguration", ALL_VERSIONS),
|
||||
fieldOf("overrideAllCommandBlockCommands", ALL_VERSIONS),
|
||||
fieldOf("unrestrictedAdvancements", max(12)),
|
||||
fieldOf("unrestrictedAdvancements", versionOf(12)),
|
||||
fieldOf("ignoreVanillaPermissions", min(13)),
|
||||
fieldOf("monsterSpawn", ALL_VERSIONS),
|
||||
fieldOf("animalSpawn", ALL_VERSIONS),
|
||||
|
|
|
|||
|
|
@ -108,16 +108,20 @@ public class ReflectionUtils {
|
|||
this.max = max;
|
||||
}
|
||||
|
||||
public static VersionParam versionOf(int min, int max) {
|
||||
public static VersionParam versionOf(int ver) {
|
||||
return new VersionParam(ver, ver);
|
||||
}
|
||||
|
||||
public static VersionParam between(int min, int max) {
|
||||
return new VersionParam(min, max);
|
||||
}
|
||||
|
||||
public static VersionParam min(int min) {
|
||||
return versionOf(min, Integer.MAX_VALUE);
|
||||
return between(min, Integer.MAX_VALUE);
|
||||
}
|
||||
|
||||
public static VersionParam max(int max) {
|
||||
return versionOf(Integer.MIN_VALUE, max);
|
||||
return between(Integer.MIN_VALUE, max);
|
||||
}
|
||||
|
||||
public boolean isCompatible() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue