Plugin Request Ninja Sneaking Plugin

Discussion in 'Plugin Help/Development/Requests' started by onemanofwisdom, May 3, 2016.

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

    onemanofwisdom

    I was hoping someone could make a 1.9 compatible plugin that (when given a certain permission) makes someone disappear while crouching, becoming visible again the instant they stop crouching. Another function I was hoping for is the inability to attack while crouching, but linked with a different permission.

    This kind of plugin would assist greatly with the new ranking system I am developing on my survival server, so it would be pretty awesome if someone was willing to make one for me. :)

    SIDE NOTE-I have found multiple plugins that seem similar to what I'm asking for here, but all are outdated with the recent update to 1.9.
     
  2. Offline

    BizarrePlatinum

  3. Offline

    onemanofwisdom

    Thanks @BizarrePlatinum ! I will be adding this to my plugins right away :). Once again thanks for the help, my server is now one step closer to the new ranking system!

    @BizarrePlatinum , It does seem there is a small problem where items held or worn do not disappear with the player. I can always work around that, but it would be nice to have it fixed if you have the time. If you can, adding an extra permission to make wearable/holdable items disappear as well would be extremely useful, but not absolutely necessary. Thanks for your help!

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited: May 9, 2016
  4. Offline

    BizarrePlatinum

    @onemanofwisdom I could possibly move the held item around, however, I don't know of any way to actually make the item invisible, this be due to the invisibility potion effect only applying to entities.
     
  5. Offline

    I Al Istannen

    @BizarrePlatinum
    You could completely hide the player. Like using Player#hide(Player). This will hide the armor, items and everything else. I am not sure about footsteps or sound though.
     
  6. Offline

    onemanofwisdom

    @BizarrePlatinum Okay, if its unfixable then I'm fine the way it is except for one small thing. It seems that players are still able to attack while crouching, but unable to attack when they aren't crouching unless they have the permission for attacking players when crouched. @I Al Istannen I'm not sure if that would work or not, I'm new to this sort of thing.
     
  7. Offline

    BizarrePlatinum

    @I Al Istannen ah, didn't even know that method existed.
    @onemanofwisdom I'll have to fix that. I'll also try using that hide method instead of using invisibility.
     
  8. Offline

    I Al Istannen

    @BizarrePlatinum
    Just be aware, that you need to call it again, if a player switches worlds or for the new player if one joins. I think render distance won't interfere, but that is quite easy to test for you :)
     
  9. Offline

    BizarrePlatinum

    @I Al Istannen I shouldn't need to call it again since the event will fire when they toggle sneaking, correct?
     
  10. Offline

    I Al Istannen

    @BizarrePlatinum
    Probably yes. If you call it when they sneak, all should be good. Only problem could be a player coming from another world and then appearing near the hiding player or a hidden player switching worlds. I haven't tried it, but some others said, than then the player new in the world would see him. You could keep a List of the hidden players (just clear them when they leave!) and on a Portal Event

    of them ==> Hide them to everyone in the new world. World#getPlayers() is helpful
    of another person to a world with a hidden player ==> Hide the hidden player for the teleporting one
    But I don't think it is a really big concern, so if you don't want to do it, you should be quite fine too :p
    Just something I forgot to tell you earlier, which might be a game changer and I am sorry for this:
    If a player is hidden using the hidePlayer method, the player ceases to exist for the other client. This means you can't hit him! You can shoot him with any projectile though, as they get completly calculated by the server.
    Since the OP wanted the invisible player to not be able to attack it could be fair again, but you would have to decide that!
     
Thread Status:
Not open for further replies.

Share This Page