[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

    xAnder

    Player said something with (an example) /o, and everybody players hear it.

    Question — may it work with iChat?
     
  3. Offline

    halvors

    It should work with iChat. I iChat do only provide some prefix features etc. And LocalChat read player prefix.

    Released LocalChat 0.2

    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

    awesome,
    I just love this plugin, this plugin was needed for so long time!
    Do you plan to have a /lc set <player> <mode> command?

    How will you solve that Admins can hear everything when they type a command or either as i said: hold adminium in their hands.
    Or better!
    give the permission for the command that you can hear either nothing or everything. :)
    for if you want to know what happens on your server or if you just want to do some helptickets without getting annoyed xD

    Thanks for the plugin :D
     
  5. Offline

    halvors

    Can add blockListener if you want. No big deal :) But maybe it's better to just have a command /lc spy with the permissions node "LocalChat.admin.spy"

    Are planning the command /lc set <player> <mode> and think permission node for that should be "LocalChat.admin.set"

    :D
     
  6. Offline

    MisanthropX

    yes, permission to do the command, not to hear anything in general.. please.
    this bugged me so much on essentials v_v
    I neede to switch between mod and admin very often because this was a permission node ONLY, which when you got it you heard anything, and admin permission = * , and to keep it flexible i had to keep it *

    Please make it a command! + permission for that command :)
     
  7. Offline

    halvors

    Sure :D

    Just a question, do you want the just "/lc" command to show your status or help?

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

    xAnder

    Status :)
     
  9. Offline

    halvors

    Should it be able to show status for other player too? Also "/lc <player>"
     
  10. Offline

    xAnder

    I have an idea — when player shout, in chat write "(2) <Player>: sometext", where 2 — count of players who hear him.
     
  11. Offline

    halvors

    Just for information?
     
  12. Offline

    xAnder

    Yep. I think, it's comfortable.
     
  13. Offline

    halvors

    Good idea :)

    LocalChat 0.3 released.

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

    Jorrdan

    Very cool update!! Just out of curiousity would /lc spy show party chat of mcmmo? Keep up the great work halvors!
     
  15. Offline

    halvors

    @Jorrdan
    Think it should work fine :)
     
  16. I'm using 0.3 with Bukkit 617, no Permissions plugin. I can't run any commands as a non-op. /lc anything just doesn't do anything. /lc with no parameters throws the following error:
    Code:
    14:10:45 [SEVERE] null
    org.bukkit.command.CommandException: Unhandled exception executing command 'lc' in plugin LocalChat v0.2
            at org.bukkit.command.PluginCommand.execute(PluginCommand.java:37)
            at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:80)
            at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:233)
            at net.minecraft.server.NetServerHandler.c(NetServerHandler.java:594)
            at net.minecraft.server.NetServerHandler.chat(NetServerHandler.java:557)
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:551)
            at net.minecraft.server.Packet3Chat.a(SourceFile:24)
            at net.minecraft.server.NetworkManager.a(NetworkManager.java:198)
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:72)
            at net.minecraft.server.NetworkListenThread.a(SourceFile:100)
            at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:368)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:283)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:375)
    Caused by: java.lang.ArrayIndexOutOfBoundsException: 0
            at com.halvors.LocalChat.LocalChatCommandExecutor.onCommand(LocalChatCommandExecutor.java:47)
            at org.bukkit.command.PluginCommand.execute(PluginCommand.java:35)
            ... 12 more
    
    As an op it seems to work fine. This isn't new to 0.3, it was in 0.2 also (just tried it).
     
  17. Offline

    halvors

    Will look into it.

    Non-op should not be able to run commands, if you'll let non-op run commands you'll have to use Permissions.

    So seems like it's not a bug anyway, just the throw error, will try fix it, but it's not so important, it should work anyway.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 13, 2016
  18. oh, well, that just ruled out this plugin for me then :). Thanks anyway.
     
  19. Offline

    halvors

    Sorry, but can't let all players use all command, we need Permissions to regulate it, most of these commands are meant just for admins.
     
  20. You should really mark this as Permissions required rather than supported then, because it's basically not useful if you don't have it. Every plugin I've seen with optional Permissions support falls back to commands valid for ops and commands valid for non-ops. Sure there are cases where a plugin has no non-op commands, but in this case non-ops should definitely be able to change their own mode and see their own status.

    Sorry, I don't mean to go off :). It looks like a great plugin.
     
  21. Offline

    Jorrdan

    Hmm, just a suggestion.. I don't know why i didnt think of this earlier. But would it be possible to implement a setting where users can type /lc chat off. And they wouldn't see any messages other from mods/administrators? I think that would be pretty cool!

    Jordan
     
  22. Offline

    halvors

    It's ok :) I can add Required :)

    You mean globally turn chat of? Can look at it later :D

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

    Jorrdan

    Yeah but still allow admins to be heard for moderating purposes. I think that would be a good option for users if the server gets too full and they dont like text spam lol. Oh maybe.. if you can... have it so only admin and mcmmo chat shows up? But the plugins awesome right now man, these are just suggestions xD

    Thanks!
    Jordan
     
  24. Offline

    MisanthropX

    This plugin is growing more and more :D
    Perfect for my server :>
    /lc off - Turn of chat group and set to default chat.
    looks pretty the same as
    /lc broadcast - Toggle broadcast group.

    turning off localchat makes you telling everything to the world, because this is default, or is it supposed to work with other mods together?
     
  25. Offline

    halvors

    @MisanthropX
    Should work with other plugins :)

    Broadcast is almost the same as /lc off, but broadcast can be set in config.yml yo have distance :D
     
  26. Offline

    Jorrdan

    Yeah just meant that if most users are using shout, and a player doesnt want to hear them for any reason they could use /lc chat off. I think with broadcast they can still see other user's shouts (i set the distance to 50,00)
     
  27. Offline

    halvors

    Yeah, through you meant that they should not hear anything?
     
  28. Offline

    MisanthropX

    you could add flags in your commands..

    e.g.
    broadcast:
    always.hear:yes

    i basically need these 3 local chat modes for

    people whispering without someone else does get the chat (like /msg but only available near :p )
    normal talking
    and shouting for speaks in city halls :)
    I use broadcast only for advertisments or hints (e.g.:hint: always make sure you extend your diary on the forum!)

    however,
    I think this is a very hard task and it may lag the server: are you available to cut off messages within a room?
    so if i am shouting, but in a room, just me and the ones in the room should hear me,
    and to allow a bit of sneaking and stalking: extend talking walls+1 (so if you are close to wall you can actually listen to it)

    I hope this won't lag too much.
    Also: is the chatrange the whole height? or is range also the height?
    What me always bugged is that earlier i lived in a town with lots of mountains and so it were possible to have living rooms over others..
    and i lived over an innkeeper, oh god I were spammed so much :confused:
    so maybe be able to cut off height a bit,(via config?, or via walls between)
    This would give it a bit of realism :)
    thanks halvors
     
  29. Offline

    halvors

    Could look at it, but first add more basic features :D

    @Jorrdan
    Should admins need to have permission node "LocalChat.admin.chat" for player should be able to see what he say when chat is off?

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

    Jorrdan

    Hey Halvors,

    I get the following error on 670:

    [SEVERE] null loading LocalChat v0.3 (Is it up to date?)
    java.lang.NullPointerException
    at com.halvors.LocalChat.Config.loadConfig(Config.java:121)
    at com.halvors.LocalChat.Config.getConfig(Config.java:103)
    at com.halvors.LocalChat.LocalChat.onEnable(LocalChat.java:63)
    at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:127)
    at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:578)
    at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:216)
    at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:115)
    at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:93)
    at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:215)
    at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:202)
    at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:142)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:257)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:375)

    If anyone else has this error, just delete the old config!

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

    halvors

    @MisanthropX
    Not tested but for now distance should be in any direction. Can look at the flags. Will be mush easier when i have finished my current work.

    Here is some info about what i am trying to implement now:
    - Custom groups, groups will be set in config.yml file. Eventually own groups.yml file. And will support more flags.
    - Working on new and better ConfigManager.
    - Going to implement user saves, so LocalChat remember your chat group yoi had last time you was on the server.
    - Of course implement new and better commands like: "/lc chat off" (To turn off chat, but admin chat is still active), "/lc list" (For listing all avaliable groups),"/lc say" (For send private message), "/lc reload" (For reload LocalChat config.).

    If you have some whishes let me know, so will i try to get it in next release (0.4).

    @MisanthropX
    You had an idea about that for spy, you need to hold bedrock in your hand. Should this replace the command? Do you want each? Is simple to add that you can hold bedrock in hand, just wounder if it's useful or just frustrating too do.

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

Share This Page