carpet client synchronizations and protocols

This commit is contained in:
gnembon committed 2020-05-28 00:06:28 -03:00
1 parent 2522884da3
commit e540f9e238
19 files changed
+406 -173

No files matched your search

+3 -2
View File
@@ -44,7 +44,7 @@ public class CarpetSettings
private static class LanguageValidator extends Validator<String> {
@Override public String validate(ServerCommandSource source, ParsedRule<String> currentRule, String newValue, String string) {
if (currentRule.get().equals(newValue))
if (currentRule.get().equals(newValue) || source == null)
{
return newValue;
}
@@ -487,7 +487,7 @@ public class CarpetSettings
{
@Override public Integer validate(ServerCommandSource source, ParsedRule<Integer> currentRule, Integer newValue, String string)
{
if (currentRule.get().equals(newValue))
if (currentRule.get().equals(newValue) || source == null)
{
return newValue;
}
@@ -538,6 +538,7 @@ public class CarpetSettings
}
}
@Override public Integer validate(ServerCommandSource source, ParsedRule<Integer> currentRule, Integer newValue, String string) {
if (source == null) return newValue;
if (newValue < 0 || newValue > 32)
{
Messenger.m(source, "r spawn chunk size has to be between 0 and 32");