`I was wondering how to disable a class, for instants when a player goes into the config.yml. I want to add a line saying something like this "Disablewarps: true ," and this will disable the whole class in order to stop all commands and events for it. Is it possible or a close way of doing so and if so can you provide an example since im more of a visual learner. Thank you
You unregister and event with a method call. You have to handle your own logic as to when a command has been disabled.
In your main class: Code:java public Boolean warpsEnabled = this.getConfig().getBoolean("warpsenabled"); In your listener, check if the warpsEnabled is true, then allow the player to do whatever (commands, etc.)