Boolean Error

Discussion in 'Plugin Development' started by migcabreraes, Nov 29, 2014.

Thread Status:
Not open for further replies.
  1. Offline

    migcabreraes

    I'm trying to create a few commands which do disable reload the plugin, activate it.
    Not Work
    Code:
    Code:java
    1. if (cmd.getName().equalsIgnoreCase("disable")) {
    2. Player p = (Player)sender;
    3. if (player.hasPermission("disable"))
    4. {
    5. PluginManager plg = Bukkit.getPluginManager();
    6. Plugin plgname = plg.getPlugin("Tested");
    7. plg.disablePlugin(plgname);
    8. plg.enablePlugin(plgname);
    9. player.sendMessage(ChatColor.GREEN + "Plugin Disabling...");
    10. }
    11. return true;
    12. }
    13. return false;
    14. }
    15. }
     
  2. Offline

    teej107

    Did you actually run your plugin?
     
  3. Offline

    migcabreraes

    If the problem is that when you run that command does not pass anything
     
  4. Offline

    teej107

Thread Status:
Not open for further replies.

Share This Page