[INACTIVE][CHAT] LocalChat v0.3 - Allow players to use chat different chat groups. [674]

Discussion in 'Inactive/Unsupported Plugins' started by halvors, Apr 5, 2011.

  1. Offline

    halvors

    LocalChat
    Version: 0.3

    License: GPLv3

    IMPORTANT: Before update to a new version of LocalChat, be sure you backup and delete your old LocalChat/config.yml file, because when add new feature/fix old feature, config file is edited, and then LocalChat will crash with old config file.

    LocalChat allow players to choose a chat group, each group have it's own radius, only players inside the radius from the chat player can hear him. This is the basic, but lot more features is comming.

    Download
    Source Code

    Features:
    • Choose different chat group with distances
    • Set chat group when player join.
    • Permissions support.
    Install (open)

    1. Copy the LocalChat.jar file into your plugins folder.
    2. Restart/reload server.
    3. If you want edit the config.yml file in plugins/LocalChat folder.

    Commands (open)

    /lc help - Show help.
    /lc status (player) - Show your/others status.
    /lc off - Turn of chat group and set to default chat.
    /lc whisper - Toggle whisper group.
    /lc speak - Toggle speak group.
    /lc shout - Toggle shout group.
    /lc broadcast - Toggle broadcast group.
    /lc set [player] [group] - Set player to chat group.
    /lc spy - Show anything on server.

    Permissions nodes (open)

    LocalChat.* - Give you access to anything.
    LocalChat.help
    LocalChat.status
    LocalChat.off
    LocalChat.whisper
    LocalChat.speak
    LocalChat.shout
    LocalChat.broadcast
    LocalChat.admin.set
    LocalChat.admin.spy

    Changelog (open)

    Version 0.3
    • Code cleanup.
    • Now "/lc (player)" command show your/others status.
    • Added support to see other peoples status using "/lc status (player)".
    • Added admin command "/lc set [player] [group]".
    • Added admin command "/lc spy".
    Version 0.2
    • Fixed that distance 0 is infinite and -1 is muted.
    • Added "/lc [chatmode] (message)".
    • Added "/lc off".
    • Added option for add player to group when join, this is set in config.yml file.
    • Added Broadcast chat group.
    Version 0.1

    • Initital release.


    Thanks to:
    MisanthropX - For the idea and support.
     
    MisanthropX and xAnder like this.
  2. Offline

    MisanthropX

    thanks a lot! awesome, gotta try now

    one thing I miss is that you can set permission for each thing. and a configuration, how far is what setting. :)
    thanks.
     
  3. Offline

    halvors

    Will post downoad link.

    Implemented.

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

    MisanthropX

    PHP:
        $variable = array(Config.*); #get all config settings (like in groupmanager/permissions, so you can set your own radius and group + permissions)
        
    while (sizeof($variable)) {
            
    $x++;
            
    LocalChat.chatMode.get(chatPlayer).equals($variable[$x]) {
            
    LocalChat.chatMode.get(chatPlayer).equals()
            
    groupDistance Config.$variable[$x];
        }
            
    i have no clue how it is in java.. this is just a noob code :S but make the config more flexible, to have more than 3 different rectangle sizes.
     
  5. Offline

    halvors

    You mean have a loop who read all variables from config file?

    Also double variable like:

    double CustomGroup = 100.0;

    Then let users make their own choices?
     
  6. Offline

    MisanthropX

    sort of, yes.
    So there are no preset variables, and that it is fully customizable by config.
    I know you put a lot of work in this and I respect your work, just to let you know ;).
     
  7. Offline

    halvors

    Can look at it :) But commands need to change then. /lc mode customchatmodeinconfig

    BTW: I have to give you credits for your idea :)
     
  8. Offline

    MisanthropX

    yes :D

    would be awesome.

    as i posted on the request as example how a config could look like:

    That would make it very flexible. the above ones are examples again, you could have more then these to give more opportunities.
     
  9. Offline

    halvors

    The mute function could just be "/lc mute (player)".

    About the group's think it's too unefective to just have:

    Code:
    lc.example: #this will be permission node
      radius: 4 #this will be radius or lets call it "size" because you use rectangles and not a round shape for localchat
      message: "you are whispering now" #this will be the message if you change to that localchat mode
      command: whisper #adds whisper to /lc list, and lets  you use /lc whisper
    
    Just one value (double).

    Exemple: 40.0 #Define block distance/radius.

    But for command it's not possible to add support for se this in config file. We should have a command called /lc mode (custommodefromconfigfilehere)

    Are going to add /lc status for your status and /lc status (player) for others. Maybe for admins, /lc set mode (custommodefromconfighere)

    :)
     
  10. Offline

    MisanthropX

    Thanks alot,
    Being able to make it more flexible is huge success :)
     
  11. Offline

    halvors

    Seems like YML have no function to get anything inside an ConfigurationNode. So seems like the feature to add custom distances is impissible :( Sure i'm going to ask at the forum here :)

    If iẗ́'s some other features let me know :)

    And if you want i can add more chat modes.
     
  12. I would really like some shortcuts for using the different modes without having to actually switch to them. for example:

    to whisper regardless of what your current status is:
    /whisper hello world...

    to speak normally:
    /say Hello world.

    to shout:
    /shout HELLO WORLD!
     
  13. Offline

    halvors

    Is /lc speak HalloWorld ok? Is /lc first to not conflict with other plugins...
     
  14. I suppose :). Would it be possible to have the non-prefixed versions available with configuration options to turn them on and off?
     
  15. Offline

    halvors

    Maybe, will look at it tomorrow ;)
     
  16. Actually, yes, the /lc first is fine. I just found a plugin that can alias commands, so I can make my own short forms :).
     
  17. Offline

    Jorrdan

    So, with these settings users would automatically log in under "speak" mode right?

    DefaultMode: Speak
    Group:
    Shout: 640000.0
    Speak: 64.0
    Whisper: 8.0

    Sigh, is there anyway to force users into /speak mode upon login? That would make a lot more sense. And also have a permission node for some users who can hear all chat?

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

    MisanthropX

    well this localchat is supposed to "switch" between localchat modes.
    but if you want to broadcast just one message:
    Halvors could make
    /lc <mode> <text>
    available, so you do not switch mode, (just for the one and only text that comes in that command)
    but if there is no text:
    so it is just
    /lc <mode>
    you switch mode so you speak in the desired mode until you change it again ;)

    I hope i clarified a few things.
    about the forcing someone into speaking:
    Halvors could place a "default" node in the config file :)

    Essentials had a permission node for this, it was essentials.chat.spy
    The problem is: if you are Admin, and got permission: * (means ALL)
    you weren't able to NOT hear anything, this often bugged me and i had to switch between mod and admin often,
    if I wanted to do a bit of roleplay on my server v_v
    Another Localchat plugin (which wasn't satisfying because there was only 1 radius to set for everyone)
    had the solution that if you hold a special block (by default adminium/bedrock which can no one gain by default but admin) then you would hear anything.
    This could be a bit more complicated for Halvors as he has to add a blocklistener.

    Also:
    You can name it whatever you want, but:
    I think you meant "broadcast", so shout it to the whole server.
    hm I have no clue but maybe Halvors can implement that size 0 is infinitive,
    and -1 is muted (as i mentioned before).

    However: i studied the source code again and there is still "only" existing whisper speak and shout.
    Is it possible to make it flexible so you can add your own commands?, or at least: will it be?.
    Not that I want to rush you, just saying what i love so much about certain plugins: that they are flexible.
    :)
    However: being able to switch between 3 localchat modes is already awesome!

    I would apreciate if you were able to make a language config file.
    So we can make our own texts for changing modes :)

    Keep on the great work, you have a nice followership here ^-^
     
  19. Offline

    2Bucks

    I agree with these guys. I like how you can toggle modes, but I'd also like being able to just shout or whisper a message without having to switch modes first.
     
  20. Offline

    halvors

    Will look at it.

    @jordan
    DefaultMode is not implemented yet, comming in release 0.2.
     
  21. Offline

    Jorrdan

    Thank you very much for your help :) The reason i would like to be able to have a default setting that is immediatly turned on to any new players is because i get so many of them. I get about 100 people a day in and out of my server when i actively advertise it, and it bugs my regulars. So forcing the new folks into a local chat that could still be heard by moderators and admins would be ideal.

    Also, thank you Halvors! I look forward to your implementation of default on status :)
     
  22. Offline

    zajacmp3

    Would be nice to have something like previous plugins like areachat and localchat from hmod.
    They were great cause they were simple

    Would be nice to being able to choose mode like !<msg> to shout and normally speaking on local + /w <msg> for whisper.

    It is more flexible to configure how you would like to speak every time than to choose one msg on local to friend and one msg shouting to some one that is far away

    And the best would be to choose prefixes for every msg like on Towny plugin that also have local chat for towns and nations
     
  23. Offline

    MisanthropX

    Well.
    Purpose of this was that you can allow whispering without letting people talk over huge distances.
    As Admin of a roleplaying Server it bugged me that i have to forbid the /msg command but have only 1 localchat radius.
    Why i forbid the msg command?
    It just breaks the immersion of roleplay..
    When i restricted messages, it ended in a spam of emotes + that people were able to hear everything they should not.

    see my problem? thats why i want to give the oppurtunity for people to speak and whisper.. at least.
    or to make it more flexible so the plugin suits the needs of everyone:

    possibility to add more than just 2 or 3 localchat modes.
     
  24. Offline

    halvors

    Instead of -1 for mute and 0 for infnite, why not just add /lc mute and for infinite turn off chat mode?

    Gonna release DefaultMode soon, but you guys want a message to be displayed to player when thay join who say "You are now in whisper mode" ?

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 13, 2016
  25. Yes, but also the ability to turn the message on and off and customizable messages too :D!
     
  26. Offline

    halvors

    Ok.

    Just want to give you some information about the feature status:

    - Fixed that distance 0 is infinite and -1 is muted.
    - Almost done: /lc <chatmode> <message>
    - Option for add player to group when join works.

    Some more features you guys want?

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

    MisanthropX

    so you added /lc mute and /lc off for infinite?
    nice :)
    I have no clue if it is an idea for a new plugin or not.
    However, my idea is that you can use commands only within a specific range.
    This comes in handy if you have something like Iconomy (which i don't use) and want people to be near when trading, so they can use specific commands only when they are near.
    or the message command (/m , /msg depending on the plugin, i use essentials for this)
    so you can allow whispering per message so no one knows about your chat but you have to be close to the other one to do so.
     
  28. Offline

    halvors

    Not added excactly /lc mute and /lc off. I added 0 for infinite and -1 for mute :) But going too add commands too. Will release 0.2 very soon.

    Just gonna test it.
     
  29. Offline

    xAnder

    Global (OOC) have?
     
  30. Offline

    halvors

    What do you mean?
     

Share This Page