Sets the enabled state of this plugin @param enabled true if enabled, otherwise false
(final boolean enabled)
| 256 | * @param enabled true if enabled, otherwise false |
| 257 | */ |
| 258 | protected final void setEnabled(final boolean enabled) { |
| 259 | if (isEnabled != enabled) { |
| 260 | isEnabled = enabled; |
| 261 | |
| 262 | if (isEnabled) { |
| 263 | onEnable(); |
| 264 | } else { |
| 265 | onDisable(); |
| 266 | } |
| 267 | } |
| 268 | } |
| 269 | |
| 270 | |
| 271 | final void init(@NotNull PluginLoader loader, @NotNull Server server, @NotNull PluginDescriptionFile description, @NotNull File dataFolder, @NotNull File file, @NotNull ClassLoader classLoader) { |
no test coverage detected