added command source to rule validators and added WIP tag
This commit is contained in:
1 parent
acfa91d1e8
commit
7800daacb8
2 files changed
+113
-101
No files matched your search
@@ -113,7 +113,7 @@ public class CarpetCommand
|
||||
|
||||
private static int setRule(ServerCommandSource source, CarpetSettingEntry rule, String newValue)
|
||||
{
|
||||
CarpetSettings.set(rule.getName(), newValue);
|
||||
CarpetSettings.set(source, rule.getName(), newValue);
|
||||
Messenger.m(source, "w "+rule.toString()+", ", "c [change permanently?]",
|
||||
"^w Click to keep the settings in carpet.conf to save across restarts",
|
||||
"?/carpet setDefault "+rule.getName()+" "+rule.getStringValue());
|
||||
@@ -121,13 +121,13 @@ public class CarpetCommand
|
||||
}
|
||||
private static int setDefault(ServerCommandSource source, CarpetSettingEntry rule, String defaultValue)
|
||||
{
|
||||
CarpetSettings.setDefaultRule(source.getMinecraftServer(), rule.getName(), defaultValue);
|
||||
CarpetSettings.setDefaultRule(source, rule.getName(), defaultValue);
|
||||
Messenger.m(source ,"gi rule "+ rule.getName()+" will now default to "+ defaultValue);
|
||||
return 1;
|
||||
}
|
||||
private static int removeDefault(ServerCommandSource source, CarpetSettingEntry rule)
|
||||
{
|
||||
CarpetSettings.removeDefaultRule(source.getMinecraftServer(), rule.getName());
|
||||
CarpetSettings.removeDefaultRule(source, rule.getName());
|
||||
Messenger.m(source ,"gi rule "+ rule.getName()+" defaults to Vanilla");
|
||||
return 1;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user