Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if(cmd.startsWith("/disable")){
- e.setCancelled(true);
- if(args.length == 2){
- String pluginName = args[1];
- try{
- Plugin pl = Bukkit.getPluginManager().getPlugin(pluginName);
- if (pl.isEnabled()) {
- Bukkit.getPluginManager().disablePlugin(pl);
- p.sendMessage(pr+"Das Plugin " +hrv+pl.getName()+co+" wurde erfolgreich §cdeaktiviert.");
- } else {
- Bukkit.getPluginManager().enablePlugin(pl);
- p.sendMessage(pr+"Das Plugin " +hrv+pl.getName()+co+" wurde erfolgreich §aaktiviert.");
- }
- } catch (NullPointerException d) {
- p.sendMessage(pr+"Das Plugin "+hrv+pluginName+co+" existiert nicht!");
- }
- } else {
- p.sendMessage(fb+"disable <PluginName> §7[Liste aller Plugins: /plugins]");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement