Inactive [CHAT] jChat v1.4.3 - Simple chat prefixes and suffixes [1.1-R4]

Discussion in 'Inactive/Unsupported Plugins' started by grandwazir, Jul 19, 2011.

  1. Offline

    grandwazir

    jChat is a simple and flexible plugin for the Minecraft wrapper Bukkit designed to allow adding prefixes and suffixes to players names. Currently it is only compatible with SuperPerms, the permissions system in Bukkit.

    Features
    • Lightweight: only manages prefixes and suffixes.
    • Modifies join, death and quit messages to reflect player's display names.
    • Player list (tab) now reflects player's display names.
    • Fast: Formats a players' name permanently on login and when a player changes worlds.
    • Good citizen: Does not interfere with other chat plugins.
    • Simple: Very easy to configure, simply assign the permission nodes to players.
    Installation

    Ensure you are using the latest recommended build.

    Before installing, you need to make sure you are running at least the latest recommended build for Bukkit. Support is only given for problems when using a recommended build. This does not mean that the plugin will not work on other versions of Bukkit, the likelihood is it will, but it is not supported.

    Getting jChat

    The best way to install jChat is to use the symbolic link to the latest version. This link always points to the latest version of jChat, so is safe to use in scripts or update plugins. Additionally you can to use the RSS feed provided by BukkitDev as this also includes a version changelog.

    Alternatively older versions are available as well, however they are not supported. If you are forced to use an older version for whatever reason, please let me know why by opening a issue on GitHub.

    Configuration

    Read the documentation

    All documentation for jChat is available on the GitHub wiki, including example usage and details on how to configure the plugin.
     
    FredKing27 and Pilkie like this.
  2. Offline

    captainawesome7

    What?
    Prefixes and suffixes with built for built in permissions
     
  3. Offline

    shadrxninga

    your missing the version number in the title
     
  4. Offline

    grandwazir

    @Tauryuu your welcome. Fixed the issues with the main post as well.
     
  5. Offline

    codename_B

    Support for Authoritator tags?

    import com.ubempire.permissions.PermissionHandler;

    String tag = PermissionHandler.tag(Player player);

    (it's static so it should be nice and easy to use)
     
  6. Offline

    grandwazir

    I'll see if I can add it for the next version.
     
  7. Does this require permissions?
     
  8. getting this when running 1.1.1 on RB#1000:
    Code:
    02:33:33 [SEVERE] Could not pass event PLAYER_CHAT to jChat
    java.lang.NullPointerException
        at name.richardson.james.jchat.listeners.jChatPlayerListener.onPlayerChat(jChatPlayerListener.java:44)
        at org.bukkit.plugin.java.JavaPluginLoader$6.execute(JavaPluginLoader.java:279)
        at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:58)
        at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:332)
        at net.minecraft.server.NetServerHandler.chat(NetServerHandler.java:682)
        at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:670)
        at net.minecraft.server.Packet3Chat.a(Packet3Chat.java:33)
        at net.minecraft.server.NetworkManager.b(NetworkManager.java:226)
        at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:85)
        at net.minecraft.server.NetworkListenThread.a(SourceFile:105)
        at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:451)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:361)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    
     
  9. Is there anyway to support multiple colours in the names?? Like a prefix being one colour with the name as the other? :)
     
  10. Offline

    b00m he@d $h0t

    give them the prefix how and where?
     
  11. Offline

    grandwazir

    Sorry for the slow replies - I forgot I was not subscribed this thread!

    Well depends what you mean. It works with both the inbuilt permissions in Bukkit and the Permissions API so yes it does require a permission system to work. However for most people the inbuilt system in Bukkit is good enough.

    I think I fixed this error before it was released and it should not be possible. I've checked my own server log and can not see any problems there. What exactly happened leading up to the error? I assume it only happened the once?

    Yup just put multiple colours in the prefix. For example:

    Code:
    prefix:
        admin: '[&cGod&f]&e'
    This would make the God part appear in red while the name would appear in yellow. I'll put more examples when I update the documentation on GitHub.

    By giving them a permission node. So in the above example I would need to give the players I wanted to have that prefix the permission: jchat.prefix.admin - see how it works? If not don't worry I am going to write some examples later today.
     
  12. It happens every time i type anything in chat, server is only running Permissions and this plugin for testing purposes.
     
  13. Offline

    grandwazir

    Redownload jChat and try again. I think you might have a broken build somehow. Also I assume you have already tried restarting the server?
     
  14. Cheers, didn't notice you did it in hex numbers :)

    I've run into a problem though - the inheritance of groups makes it impossible to have a separate thing for each group

    For example -
    Default
    Permissions:
    - jchat.prefix.reg

    Moderator (inherits default)
    Permissions: (i tried it with and without the first line)
    - -'jchat.prefix.reg'
    - jchat.prefix.mod

    Makes everyone show up as regular. Am I doing something wrong at all?

    Oh and as an admin I can't use it, the permission of '*' causes an error each time and I don't get any colours at all
     
  15. Offline

    grandwazir

    You are doing exactly the right thing but for some reason what ever permission system you are using is not removing the previous prefix. Oddly enough on my server this type of inheritance works without me having to deduct the previous prefix.

    Actually I have worked why. It works because the plugin looks through the prefixes in the order they appear in the config.yml - so in your case just put your mod prefix above your regular one in your config file.

    Not entirely sure what the issue is here. Why are you trying to wildcard all the prefixes to yourself?
     
  16. It's the default setting for the group called Admins, to give them all privileges without having to type each one out, also the plugin didn't work for the Moderator group, as it inherits from the Default one
    I think the problem is that there's no real way to stop a user inheriting the tag from a lower group without unlinking the groups

    Would it require much coding to change it so instead of having to write a config line, and then add jchat.prefix.name to
    permissions, you write the name of the actual permission group and it automatically links to permissions? This is the only way i can think of which should make it work really well :)
     
  17. Offline

    FlukiestEmperor

    He saying since you have "Do not assign multiple prefixes/suffixes to one player" in your wiki you can no longer use '*' as a permission node for admins, which obviously would assign multiple prefixes/suffixes to one player...


    Edit:
    I wish this plugin supported permission 3.1.6 to read the chat color.
     
  18. Offline

    grandwazir

    Oh I am with you now. Well I am not entirely sure what I can do about this to be honest. The design of the plugin never intended wild-carded permissions (it was designed originally for the inbuilt system but I had to adapt it for myself when moved my server back to Permissions because of WorldGuard).

    There is a way to stop users inheriting tags from lower down and that is to order prefixes in config.yml into the order that you want them to be checked. By doing this you can make sure your admins still receive the admin tag as long as it is top of the list. This is because jChat keeps looking until it finds a valid prefix and then stops. I've updated the wiki to reflect this.

    I can look into it for you, but I did not want to go down that route if I could avoid it. The reason is not every Permission manager that does the Permissions API supports those tags. BukkitPermissions for example does not and that is the stable for groups using built in permissions. The way I currently do it works across all systems.
     
  19. If you didn't want to go down that route then its ok, i just thought it might work a little more efficient :)


    Edit: I just managed to get the inheritence problem sorted, but when i attempt to do admin, it still dies. the log says
    2011-08-01 00:50:21 [SEVERE] Could not pass event PLAYER_JOIN to jChat
    java.lang.NullPointerException

    at name.richardson.james.jchat.jChat.searchNodes(jChat.java:129)
    at name.richardson.james.jchat.jChat.setDisplayName(jChat.java:86)
    at name.richardson.james.jchat.listeners.jChatPlayerListener.onPlayerJoin(jChatPlayerListener.java:25)
    at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:244)
    at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:58)
    at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:332)
    at net.minecraft.server.ServerConfigurationManager.c(ServerConfigurationManager.java:124)
    at net.minecraft.server.NetLoginHandler.b(NetLoginHandler.java:97)
    at net.minecraft.server.NetLoginHandler.a(NetLoginHandler.java:33)
    at net.minecraft.server.NetworkListenThread.a(SourceFile:91)
    at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:451)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:361)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
     
  20. Offline

    grandwazir

    Well that should not be possible. By do admin do you mean adding '*'? If you are does it work when you don't do that?

    I know why - I'll do a fix now.
     
  21. Nah I'm adding the
    - jchat.prefix.admin
    to the admin group, but it doesn't like at all xD

    Anyways I'm off to bed cuz it's like 1am, i'll try more tomorrow :)
     
  22. Offline

    grandwazir

    I handle this error now. Download the new version which should solve this issue. I am pretty sure this is because you have something like this in your configuration:

    Code:
    prefix:
        admin:
    
    jChat now warns you if you have any undefined prefixes instead of throwing an exception. You will still need to fix your configuration to stop the plugin from throwing the warning.
     
  23. Thanks man, it works really well now :D I hadn't left any of the prefixes like that, but I hadn't defined any suffixes which may have caused the problem :)
     
  24. Offline

    codename_B

    bInfo support? bInfo uses a universally available bukkit services hook for prefix/suffix. CraftIRC3 uses it - and any plugin using the interface can provide the prefix/suffix so there's no reason NOT to add support :)
     
  25. Offline

    grandwazir

    Good idea - I'll add it for the next version.
     
  26. Offline

    codename_B

    If you need any help - hit me up. I'll add this plugin to the bInfo page of supported plugins when you're done!
     
  27. Offline

    grandwazir

    I had a play with implementing it but I think I am missing the point of services (or implementing it wrong). I thought the idea was I could load the highest priority provider but when use my own class it ends up seeing that as an actual service even though I have not registered it which is odd.
     
  28. Offline

    codename_B

    I've been discovering you need to include my plugin in the build path and use my namespace for it - still figuring out this services lark.
     
  29. Offline

    Tathar

    Why not just use the prefix and suffix info fields already used by Permissions? Using permission nodes just invites conflicting prefix permission nodes, especially for anyone with the * node.
     
  30. Very good plugin, just missing one very important thing though!
    I don't like the <username> format on my server! You should add a message format
    editing option!
     

Share This Page