Codota Logo
ViaVersionConfig.isCheckForUpdates
Code IndexAdd Codota to your IDE (free)

How to use
isCheckForUpdates
method
in
us.myles.ViaVersion.api.ViaVersionConfig

Best Java code snippets using us.myles.ViaVersion.api.ViaVersionConfig.isCheckForUpdates (Showing top 6 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
DateTime d =
  • Codota Iconnew DateTime()
  • Codota IconDateTimeFormatter formatter;String text;formatter.parseDateTime(text)
  • Codota IconObject instant;new DateTime(instant)
  • Smart code suggestions by Codota
}
origin: MylesIsCool/ViaVersion

public void init() {
  if (System.getProperty("ViaVersion") != null) {
    // Reload?
    platform.onReload();
  }
  // Check for updates
  if (platform.getConf().isCheckForUpdates())
    UpdateUtil.sendUpdateMessage();
  // Force class load
  ProtocolRegistry.getSupportedVersions();
  // Inject
  try {
    injector.inject();
  } catch (Exception e) {
    getPlatform().getLogger().severe("ViaVersion failed to inject:");
    e.printStackTrace();
    return;
  }
  // Mark as injected
  System.setProperty("ViaVersion", getPlatform().getPluginVersion());
  // If successful
  platform.runSync(new Runnable() {
    @Override
    public void run() {
      onServerLoaded();
    }
  });
}
origin: MylesIsCool/ViaVersion

  @Override
  public boolean execute(ViaCommandSender sender, String[] args) {
    ConfigurationProvider provider = Via.getPlatform().getConfigurationProvider();
    boolean newValue = !Via.getConfig().isCheckForUpdates();

    provider.set("checkforupdates", newValue);
    provider.saveConfig();
    sendMessage(sender, "&6We will %snotify you about updates.", (newValue ? "&a" : "&cnot "));

    return true;
  }
}
origin: MylesIsCool/ViaVersion

  @Listener
  public void onJoin(ClientConnectionEvent.Join join) {
    if (join.getTargetEntity().hasPermission("viaversion.update")
        && Via.getConfig().isCheckForUpdates()) {
      UpdateUtil.sendUpdateMessage(join.getTargetEntity().getUniqueId());
    }
  }
}
origin: MylesIsCool/ViaVersion

  @EventHandler
  public void onJoin(PostLoginEvent e) {
    if (e.getPlayer().hasPermission("viaversion.update")
        && Via.getConfig().isCheckForUpdates()) {
      UpdateUtil.sendUpdateMessage(e.getPlayer().getUniqueId());
    }
  }
}
origin: MylesIsCool/ViaVersion

  @EventHandler
  public void onJoin(PlayerJoinEvent e) {
    if (e.getPlayer().hasPermission("viaversion.update")
        && Via.getConfig().isCheckForUpdates()) {
      UpdateUtil.sendUpdateMessage(e.getPlayer().getUniqueId());
    }
  }
}
origin: MylesIsCool/ViaVersion

  @Subscribe
  public void onJoin(PostLoginEvent e) {
    if (e.getPlayer().hasPermission("viaversion.update")
        && Via.getConfig().isCheckForUpdates()) {
      UpdateUtil.sendUpdateMessage(e.getPlayer().getUniqueId());
    }
  }
}
us.myles.ViaVersion.apiViaVersionConfigisCheckForUpdates

Popular methods of ViaVersionConfig

    Popular in Java

    • Making http post requests using okhttp
    • requestLocationUpdates (LocationManager)
    • runOnUiThread (Activity)
    • startActivity (Activity)
    • Color (java.awt)
      The Color class is used encapsulate colors in the default sRGB color space or colors in arbitrary co
    • SimpleDateFormat (java.text)
      Formats and parses dates in a locale-sensitive manner. Formatting turns a Date into a String, and pa
    • Hashtable (java.util)
      Hashtable is a synchronized implementation of Map. All optional operations are supported.Neither key
    • BlockingQueue (java.util.concurrent)
      A java.util.Queue that additionally supports operations that wait for the queue to become non-empty
    • Executors (java.util.concurrent)
      Factory and utility methods for Executor, ExecutorService, ScheduledExecutorService, ThreadFactory,
    • Semaphore (java.util.concurrent)
      A counting semaphore. Conceptually, a semaphore maintains a set of permits. Each #acquire blocks if
    Codota Logo
    • Products

      Search for Java codeSearch for JavaScript codeEnterprise
    • IDE Plugins

      IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
    • Company

      About UsContact UsCareers
    • Resources

      FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
    Get Codota for your IDE now