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.
Source: https://bitbucket.org/stuntguy3000/godmodeteleport Give me a moment to upload and bug test. Direct Download: Click Enjoy EDIT by Moderator: merged posts, please use the edit button instead of double posting.
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. 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.
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.
Yes i can do, and don't feel like an asshole. Its perfectly fine 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.
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.
Coder battle up in here I see. *Steps back and is thankful for everyone's input* Thanks for the update. 100000000 diamonds for you.
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!