...
 
Commits (2)
......@@ -40,7 +40,7 @@ for `:` and `_` are specified in the config file.
Custom exceptions are allowed as well, naturally.
Greentext can be either enabled or disabled upon startup.
In the case the parameter `enabled-on-startup` is set true,
In the case the parameter `enabled-by-default` is set true,
each player must manually enable the plugin with `/greentext on`.
Additionally, orangetext, an obscure feature
[used probably once](https://www.reddit.com/r/BannedFrom4chan/comments/221co5/),
......
......@@ -94,6 +94,21 @@ public class BukkitGreentext extends JavaPlugin
/* TODO: change logger level */
}
/* ...actually, go back and write the `debug' key to the config file
* if it doesn't exist (was added in version 2.0) */
if (!(config.isSet("debug"))) {
getLogger().config("Updating configuration file with new `debug' key...");
/* If it didn't exist, `is_debug' holds the default value
* since `saveDefaultConfig()' was called */
config.set("debug", is_debug);
try {
this.saveConfig();
} catch (Throwable ex) {
getLogger().warning("Failed to update configuration file.");
ex.printStackTrace();
}
}
getLogger().finest("Initialising player hashmap...");
enabled_for_player = new HashMap<UUID, Boolean>();
......
......@@ -5,6 +5,4 @@ exceptions:
- ':'
- '_'
- '.'
# Enable this only if you want oodles of log messages
debug: false