Invincible Teleporting

Discussion in 'Archived: Plugin Requests' started by xBladeM6x, Jun 29, 2013.

  1. Offline

    xBladeM6x

    I would be very appreciative if someone would be willing to make me a very simple plugin (or point one out) in which it does one thing;
    • Makes the player invincible after a teleportation for an amount of time specified in the config.yml (or whatever equivalent .yml file), and is able to be enabled / disabled in certain worlds.
    The logic behind this comes from me wanting to make a way to combat people from just getting continuously destroyed every time they use the command /back (Essentials) after dying from hostile mobs that killed them to begin with.

    Updated OP to be more clear.

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

    stuntguy3000

    Happy to fill.
     
  3. Offline

    xBladeM6x

    I'm assuming this means you'll make it? :D
     
  4. Offline

    stuntguy3000

    Yep :) Will be done within the next 10 minutes.
     
  5. Offline

    xBladeM6x

    Holy crap. You're like some supernatural force send from the Bukkit heavens. Lol
     
    stuntguy3000 likes this.
  6. Offline

    stuntguy3000

    Last edited by a moderator: Jun 2, 2016
    xBladeM6x likes this.
  7. Offline

    xBladeM6x

    This works flawlessly. Thank you so much. Although I totally didn't think about this when I wrote it. Do you think it would be possible to add permission nodes like this;
    • GodmodeTeleport.user (just so a certain rank can get it / i can decide who gets it)
    • GodmodeTeleport.message (permission for if you'll see the message about your godmode or not. Or you can make it a true / false thing in the config. Your choice)
    By all means, you don't have to. But it would make this completely perfect. I feel like an asshole just asking for you to add on. :oops: If you don't want to add to this, it's fine as this works for what I need it for. Just let me know. Again, I really appreciate it more than you could imagine. :cool:
     
  8. Offline

    skore87


    You should seriously consider altering your teleport event. Plenty of plugins use teleport and hopefully set the reason as well. You should check for TeleportCause on the event in addition to the permission.
     
  9. Offline

    stuntguy3000

    Yes i can do, and don't feel like an asshole. Its perfectly fine :p

    Added both permissions,
    Direct Download (Click) | Source (Click)


    What difference does it make? Why should be restricted down to one type of teleport?

    "Additionally your messages contain color codes that won't be processed. Use the ChatColor class or use the appropriate color code character (§)."

    ..Yes they do get processed?

    String message = ChatColor.translateAlternateColorCodes('&', input);

    ^ Works.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 2, 2016
  10. Offline

    Faith

    Because there could be a warp/teleport in which there shouldn't be a moment of invincibility.
     
  11. Offline

    stuntguy3000

    I assumed that this plugin was for warping around, which would fall under the plugin cause.
     
  12. Offline

    skore87


    Bingo. One example would be TeleportCause.ENDER_PEARL. I agree with the temporary invulnerability on larger teleports like from command or a portal. Ones that I believe you should definitely do it on are COMMAND, END_PORTAL, and NETHER_PORTAL. You might have to play around with the effectiveness with using PLUGIN or UNKNOWN though as they could go either way.


    Oddly you quoted me after I deleted the message. I don't see the need in that. I didn't initially see the c() method so I corrected my post within a minute of making it.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 2, 2016
  13. Offline

    ibJarrett

    stuntguy3000 Your just doing your job! The man wanted the plugin and so you filled it!
     
  14. Offline

    xBladeM6x

    Coder battle up in here I see. *Steps back and is thankful for everyone's input*



    Thanks for the update. 100000000 diamonds for you.
     
  15. Offline

    xBladeM6x

    So it turns out I need this updated. The plugin is perfectly fine, but there's some tweaking needed to make it perfect. Upon finding some exploits with it being on "Teleport in general" and not only "Teleport by command", it can be abused. So if anyone is looking to try, here's what I need:
    • Use the source posted in the quote above me (or write your own, as long as it's the "same")
    • Make the messages configurable to being turned off and on by the config, not by permission node.
    • Make it only activate the teleportation invincibility when using a command. Not "in general teleporting".
    Thanks!
     
  16. Offline

    stuntguy3000

    Will do. I will do what the guys above said.
     

Share This Page