use of com.viaversion.viaversion.api.configuration.ConfigurationProvider in project ViaVersion by ViaVersion.
the class AutoTeamSubCmd method execute.
@Override
public boolean execute(ViaCommandSender sender, String[] args) {
ConfigurationProvider provider = Via.getPlatform().getConfigurationProvider();
boolean newValue = !Via.getConfig().isAutoTeam();
provider.set("auto-team", newValue);
provider.saveConfig();
sendMessage(sender, "&6We will %s", (newValue ? "&aautomatically team players" : "&cno longer auto team players"));
sendMessage(sender, "&6All players will need to re-login for the change to take place.");
return true;
}
use of com.viaversion.viaversion.api.configuration.ConfigurationProvider in project ViaVersion by ViaVersion.
the class DontBugMeSubCmd method execute.
@Override
public boolean execute(ViaCommandSender sender, String[] args) {
ConfigurationProvider provider = Via.getPlatform().getConfigurationProvider();
boolean newValue = !Via.getConfig().isCheckForUpdates();
Via.getConfig().setCheckForUpdates(newValue);
provider.saveConfig();
sendMessage(sender, "&6We will %snotify you about updates.", (newValue ? "&a" : "&cnot "));
return true;
}
Aggregations