depend not working

Discussion in 'Plugin Development' started by thecrystalflame, Jul 28, 2013.

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

    thecrystalflame

    the plugin i am currently making requires RemoteEntities to load before it does, however even after adding:
    depend: [RemoteEntities]
    to the plugin.yml it still decides to load before.


    Code:
    14:40:15 [SEVERE] Could not load 'plugins/WastelandCore.jar' in folder 'plugins'
    org.bukkit.plugin.InvalidPluginException: de.kumpelblase2.remoteentities.exceptions.PluginNotEnabledException: RemoteEntities needs to be enable in order to use this operation
    14:40:15 [INFO] [RemoteEntities] Loading RemoteEntities v1.8-SNAPSHOT
    14:40:15 [INFO] [RemoteEntities] Enabling RemoteEntities v1.8-SNAPSHOT
    
     
  2. Offline

    xTrollxDudex

  3. Offline

    thecrystalflame

    xTrollxDudex
    may sound amateur but sorry could you please tell me how this is done?
     
  4. Offline

    xTrollxDudex

    thecrystalflame
    Outside of the onEnable you would make a null plugin variable at the top of the class

    In the onEnable()
    PHP:
    Bukkit.getScheduler().scheduleSyncDelayedTask(this, new Runnable(){
    @
    Override
    public void run(){
    //set the plugin variable here
    }
    }, 
    60L);
    You may need to increment the 60 to increase delay, this is in ticks where 1 tick is 1/20 of a second.

    Now you can use the plugin variable
     
  5. Offline

    thecrystalflame

Thread Status:
Not open for further replies.

Share This Page