Invisible for certains groups (Easy?).

Discussion in 'Archived: Plugin Requests' started by Lummox, Jul 9, 2014.

  1. Hello, I have a server that mixture roleplay and vanilla players. I would like to separate two types of players for are not mixed together.

    I thought one way to do and is doing invisible to each other. The idea is to create two groups in the permissions plugin.

    Code:
    Roleplay:
    permissions:
    - invisible.for.vanilla
    
    Vanilla:
    permissions:
    - invisible.for.roleplay
    
    The group that has the permission "invisible.for.vanilla" not be able to see the players who are in the "vanilla" group, but will be visible to those who belong to the group "roleplay". Same with the "vanilla" group that are invisible to the "roleplay" group but is visible for your own group.

    Is there any plugin that can do this?, Otherwise someone could do it?.

    Name: Invisible groups

    Permissions:
    - invisible.for <group>.
    # Enter in the field name <group>, the group of players who do not want to see you.

    - invisible.admin
    # Special permissions for administrators. This permit allows you to see any player of any group.

    Thanks and regards and sorry for my english.
     
  2. Offline

    daavko

    Lummox So, you have two permission groups and you don't want them to see each other? And admins to see everybody? That might be easy with Vault.
     
  3. Offline

    timtower Administrator Administrator Moderator

    daavko Don't even need Vault
     
  4. Offline

    daavko

    timtower That's true if you want to only support one permission plugin or have hard-coded support for all of them.
     
  5. Offline

    timtower Administrator Administrator Moderator

    daavko How about player.hasPermission(String) ?
    Every permission plugin is supporting that these days. In my opinion: vault can remove the permission part
     
  6. Offline

    daavko

    timtower Yes, permissions are one way to do this. Also, you could have it group-based. Check player's group and make players invisible for him (if there are any). (I now realized you don't see inside my head, so you couldn't know I was thinking about group-based invisibility)
     
  7. Offline

    timtower Administrator Administrator Moderator

    daavko Give the group the perm :p Same effect :p
    Without kidding: do it the way you want to do it. Good luck ;)
     
  8. Yes, basically that's it. I have two groups of players "Roleplay" and "Vanilla".

    What I need is that belonging to a group can not see (invisible for) the opposing group.
    If you do not see the armor, or what carry in the hand, much better.

    I'm not a developer, I need a plugin to do this, or that someone be kind to create me this plugin.

    A greeting.
     
  9. Offline

    daavko

    timtower I never wrote I want to do it :D. But this seems quite easy. Just wondering, does player.hidePlayer(anotherPlayer) hide his armor/items in hand?
     
    Lummox likes this.
  10. Offline

    timtower Administrator Administrator Moderator

    Hides the other player like he isn't even online
     
  11. If you could make this plugin, I would be very grateful.

    A greeting;)
     
  12. Offline

    daavko

    Lummox Okay, I'll make this for you :) just wait a couple of hours, about lunchtime here :D
     
  13. Offline

    dsouzamatt

    Lummox Would you also want those groups not to be able to interact with each other?
     
  14. daavko

    Thank you! Don't worry, i can wait :D

    dsouzamatt
    You mean that "PVP"? Being invisible, they can not hit between them, right?
     
  15. Offline

    dsouzamatt

    It depends on what you're trying to do with this but yes, I think you'd probably want players in each group not to be able to hit each other, maybe even not trade items or "interact" as I said before in other ways as well.

    Edit: I don't think invisibility prevents dealing damage.
     
  16. It would be perfect that they could not interact or trade with them, but maybe this would make more complex the plugin. I will not be picky requesting :p . If this is something easy to make, perfect, if not, that they can not see each other is me enough.

    About the damage remain invisible ... how can you attack someone If you I do not see it?

    Greetings ;)
     
  17. Offline

    dsouzamatt

    I don't know, you might accidentally poke someone with your diamond sword? :p

    I think daavko should be able to add some of those features if you ask him nicely enough ...[diamond] [diamond] [diamond]
     
  18. Offline

    daavko

    dsouzamatt Lummox Yeah, "accidentaly" :D I know those "accidents". And additional features...NoPvP - easy to do. NoInteract - depends on what you mean by interacting. NoTrade - what kind of trade? Commands?
     
  19. Offline

    dsouzamatt

    daavko On the PlayerCommandPreprocessEvent you could cancel any command containing the name of a player in the other group.

    As far as interacting...maybe only allowing players from the same group as the placer to use chests? It really depends on what Lummox wants.
     
  20. Offline

    daavko

    dsouzamatt Sure, could use PlayerCommandPreprocessEvent, also could use AsyncPlayerChatEvent (which is also fired when player does command) - I really don't see much difference between them. And those chests, maybe furnaces, brewing stands...that would take some more time to do. However, if Lummox uses LWC for chest protection, he could configure it to protect other blocks and I could easily add another cancellation to commands (which are required to unlock things with LWC)
     
  21. Offline

    Necrodoom

    daavko commands are not chat. Its not the same thing.
     
  22. Offline

    daavko

    Necrodoom So you want to tell me my whole life is a lie? Damn! (Yeah, realized that after I have read your post and looked up AsyncPlayerChatEvent in Bukkit JavaDocs)
    Okay, just PlayerCommandPreprocessEvent is fired.
     
  23. Offline

    dsouzamatt

    daavko If what you've said is correct, then I believe that AsyncPlayerChatEvent is fired whenever a player types something, whereas PlayerCommandPreprocessEvent is only fired when what they have typed is a command (starts with a slash). In that case, PlayerCommandPreprocessEvent is fired less often, possibly improving performance slightly.

    On top of that, I don't think there's anything wrong with using someone's name from "across dimensions" or whatever you'd like to call this scenario... actually, per group chat may also be a good idea to add, if Lummox would like it.

    Edit:


    That awkward moment when someone posts while you're typing :p
     
  24. Offline

    daavko

    dsouzamatt Per group chat, that is a nice idea, but this is starting to look like putting two servers into one and having separated players completely :D
     
  25. Offline

    dsouzamatt

    For some reason that reminded me of this...
     
  26. Really just need that they can not see between the groups. For protection of chests I have "LWC" and for the use of the chat, Herochat (different channels for each group).

    As most simple is the "plugin", better :p

    Greetings ;)
     
  27. Offline

    ArsenArsen

    TownyChat Makes more groups even more flexible!
     
  28. Offline

    daavko

    Lummox LWC, good! I can make it so players can't unlock chests for players they can't see :D Of course, all configurable. But I have to leave it for 2,5 hours now, going to cinema...
     
  29. If there don't gives you a lot of work, it is a good idea. I don't will to charge you more work ;)
     
  30. Offline

    daavko

    Lummox That's okay, it is not that hard to cancel few more commands :)
     

Share This Page