private void initConfig() { plugin .saveDefaultConfig(); // creates a copy of the provided config.yml in the plugins data // folder, if it does not exist config = plugin .getConfig(); // re-reads config out of memory. (Reads the config from file only, when // invoked the first time!) }
// reloads the config from disc (used if user made manual changes to the config.yml file) public void reloadConfig(CommandSender sender) { plugin.reloadConfig(); config = plugin .getConfig(); // new assignment necessary when returned value is assigned to a variable // or static field(!) plugin.readConfigValues(); sender.sendMessage( AsyncTest.logPrefix + plugin.getDescription().getName() + " " + plugin.getDescription().getVersion() + " reloaded!"); }
public void saveConfig() // saves the config to disc (needed when entries have been altered via the plugin // in-game) { // get and set values here! plugin.saveConfig(); }
public void testSerializationClicked(View caller) { AsyncTest addAsyncProxy = new AsyncTest(this, TestAction.TEST_SERIALIZATION); addAsyncProxy.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR); }
public void clearPrefAndDB(View caller) { AsyncTest addAsyncProxy = new AsyncTest(this, TestAction.CLEAR_ALL); addAsyncProxy.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR); }
public void clearProxyForAllAp(View view) { AsyncTest clearAsyncProxy = new AsyncTest(this, TestAction.CLEAR_ALL_PROXIES); clearAsyncProxy.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR); }
public void testProxyValidations(View view) { AsyncTest testValidation = new AsyncTest(this, TestAction.TEST_VALIDATION); testValidation.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR); }
public void addTagsDBClicked(View caller) { AsyncTest addAsyncProxy = new AsyncTest(this, TestAction.ADD_TAGS); addAsyncProxy.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR); }
public void setProxyForAllAp(View view) { AsyncTest setAllProxies = new AsyncTest(this, TestAction.SET_ALL_PROXIES); setAllProxies.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR); }
public void toggleDemoModeClicked(View caller) { AsyncTest toggleDemoMode = new AsyncTest(this, TestAction.TOGGLE_DEMO_MODE); toggleDemoMode.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR); }
public void addExampleProxyClicked(View caller) { AsyncTest addAsyncProxy = new AsyncTest(this, TestAction.ADD_EXAMPLE_PROXIES); addAsyncProxy.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR); }
public void startStartupActions(View view) { AsyncTest startupActionsAsync = new AsyncTest(this, TestAction.RUN_STARTUP_ACTIONS); startupActionsAsync.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR); }
public void removeWifiNetworks(View view) { AsyncTest removeAsyncWifiNetworks = new AsyncTest(this, TestAction.REMOVE_TEST_WIFI_NETWORKS); removeAsyncWifiNetworks.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR); }
public void addWifiNetworks(View view, int numWifiToAdd) { AsyncTest addAsyncWifiNetworks = new AsyncTest(this, TestAction.ADD_TEST_WIFI_NETWORKS, numWifiToAdd); addAsyncWifiNetworks.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR); }