Enderdragons Unbound - Keep Enderdragons from Flying to Spawn

Discussion in 'Archived: Plugin Requests' started by NazzyDragon, Apr 16, 2012.

  1. tobiyas Well, I don't see a error in the code snippets right now. :( But a hint:
    if(!event.getEntityType().equals(EntityType.ENDER_DRAGON)) return;
    can safely be replaced with
    if(event.getEntityType() != EntityType.ENDER_DRAGON) return;
    as EntityType is a Enum and as such all entries are final and can't change.
    Also There's no need to cast Plugin to DragonTravelMain, use this instead:
    Code:java
    1. Plugin otherPlugin = plugin.getServer().getPluginManager().getPlugin("DragonTravel");
    2. if(otherPlugin != null && otherPlugin.isEnabled()){


    And a question: What's plugin.useDTBridge() for? Also: Could you include such a bridge for RideThaDragon, too? :)
     
  2. Offline

    tobiyas

    I wanted to change that. ;) didn't like it. But it worked.
    The boolean is just current check if the plugin is enabled (with an Listener for enable).
    I'm aware, that the code is doubled (just testing stage ;) cleaning afterwards).
    I wanted to add an Converter for the XemDragon of DragonTravel, but after all it's still empty ;)
    (low priority).
     
  3. Offline

    NazzyDragon

    Gah! Java code! Arrrgh! Does this mean you've possibly fixed the issue? My server owner is poking about right now.
     
  4. Offline

    tobiyas

    Maybe... since I have no idea where the error is, I don't know if it is fixed :)

    NazzyDragon

    I changed some stuff with dependencies and recognicion of DragonTravel. (And added recognition of RideThaDragon).
    It would be nice if you could try it and tell me if the server still has the same spawning errors.
    (If still the dragons spawn, you can kill them all with /kedp <range> 0 (zero) means all).

    link

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 25, 2016
  5. Offline

    NazzyDragon

    Send it to djurg over the forums and I'll try to convince him! ;)
     
  6. Offline

    tobiyas

    Done
     
  7. Offline

    tobiyas

    Released it on dev.bukkit:
    link
     
  8. Offline

    NazzyDragon

    Woohoo! I'm sure a lot of people will like this plugin ^_^
     
  9. Offline

    HappyPikachu

    tobiyas

    Did you get the bug from earlier worked out? I came up with something simpler for Pigcraft (it just uses .teleport() for returning home), but it'd rather see this used.

    Excellent work, btw! ^.^
     
  10. Offline

    tobiyas

    I hope so. I can't test it localy, because I can't get it reproduced. =/
    Just added a bunch of checking before replacing (check for class: net.minecraft.server.EntityEnderdragon)
    I hope this is enough. But for this I would need feedback from the owner.
     

Share This Page