Mirror von
https://github.com/ViaVersion/ViaVersion.git
synchronisiert 2024-12-28 17:10:13 +01:00
Ursprung
9a24129e49
Commit
0986b0982c
@ -120,6 +120,12 @@ public abstract class AbstractViaConfig extends Config implements ViaVersionConf
|
|||||||
return checkForUpdates;
|
return checkForUpdates;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setCheckForUpdates(boolean checkForUpdates) {
|
||||||
|
this.checkForUpdates = checkForUpdates;
|
||||||
|
set("checkforupdates", checkForUpdates);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isPreventCollision() {
|
public boolean isPreventCollision() {
|
||||||
return preventCollision;
|
return preventCollision;
|
||||||
|
@ -11,6 +11,14 @@ public interface ViaVersionConfig {
|
|||||||
*/
|
*/
|
||||||
boolean isCheckForUpdates();
|
boolean isCheckForUpdates();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets whether to check for updates. This updates the internally cached value
|
||||||
|
* as well as the config, but does not save the config to disc.
|
||||||
|
*
|
||||||
|
* @param checkForUpdates true to check for updates on server start and joins
|
||||||
|
*/
|
||||||
|
void setCheckForUpdates(boolean checkForUpdates);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get if collision preventing for players is enabled
|
* Get if collision preventing for players is enabled
|
||||||
*
|
*
|
||||||
|
@ -6,6 +6,7 @@ import us.myles.ViaVersion.api.command.ViaSubCommand;
|
|||||||
import us.myles.ViaVersion.api.configuration.ConfigurationProvider;
|
import us.myles.ViaVersion.api.configuration.ConfigurationProvider;
|
||||||
|
|
||||||
public class DontBugMeSubCmd extends ViaSubCommand {
|
public class DontBugMeSubCmd extends ViaSubCommand {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String name() {
|
public String name() {
|
||||||
return "dontbugme";
|
return "dontbugme";
|
||||||
@ -21,7 +22,7 @@ public class DontBugMeSubCmd extends ViaSubCommand {
|
|||||||
ConfigurationProvider provider = Via.getPlatform().getConfigurationProvider();
|
ConfigurationProvider provider = Via.getPlatform().getConfigurationProvider();
|
||||||
boolean newValue = !Via.getConfig().isCheckForUpdates();
|
boolean newValue = !Via.getConfig().isCheckForUpdates();
|
||||||
|
|
||||||
provider.set("checkforupdates", newValue);
|
Via.getConfig().setCheckForUpdates(newValue);
|
||||||
provider.saveConfig();
|
provider.saveConfig();
|
||||||
sendMessage(sender, "&6We will %snotify you about updates.", (newValue ? "&a" : "&cnot "));
|
sendMessage(sender, "&6We will %snotify you about updates.", (newValue ? "&a" : "&cnot "));
|
||||||
|
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren