[CHAT/MECH] MyNames v1.2.1 - Give players aliases for use in commands [1000]

Discussion in 'Inactive/Unsupported Plugins' started by imjake9, Jul 23, 2011.

  1. Offline

    imjake9

    MyNames - A player name aliases plugin:
    Version: 1.2.1

    Ever have someone with a really long name on your server, and you wish you could type something shorter? Ever wish you could call your best friend by his real name rather than typing out his username? Now you can! MyNames allows you to set custom aliases for other players that get auto-replaced when using commands. For example, you could set an alias for a player named "player12345" called "John". Now, if you type "/command john", it'll be the same as typing "/command player12345". By default, this only works with commands; aliases are not replaced in normal chat. However, you can set it to parse all chat if you wish.

    Download MyNames v1.2.1
    MyNames on GitHub

    Features:
    • Give players aliases for use in commands
    • Works with Bukkit superperms and Permissions
    • Each player has his/her own set of aliases
    Commands:
    • /setnamealias <player> <alias> – Creates alias "alias" for player "player"
    • /removenamealias <player> <alias> – Removes alias "alias" for player "player"
    • /cleannamealiases – Removes all of a player's aliases
    • /listnamealiases – Lists all of a player's aliases
    • /namealiashelp – Shows help for all MyNames commands
    Configuration:
    • usebukkitpermissions – Set to "true" to use Bukkit superperms. Set it to "false" to use Permissions 2/3.
    • parsenormalchat – Set to "true" to parse aliases even in normal chat. Otherwise, it will just parse aliases in commands.
    Permissions Nodes:
    • mynames.setnamealias – Allows the use of /setnamealias
    • mynames.removenamealias – Allows the use of /removenamealias
    • mynames.clearnamealiases – Allows the use of /clearnamealiases
    • mynames.listnamealiases – Allows the use of /listnamealiases
    • mynames.namealiashelp – Allows the use of /namealiashelp
    • mynames.* – Gives access to all mynames permissions
    NOTE: The commands are rather long, but if you wish, I recommend using Bukkit's built-in alias system to change them.

    Changelog:
    Version 1.2.1
    • Bug fixes
    Version 1.2
    • Added option to parse aliases in non-command chat
    Version 1.1
    • Fixed NPE when replacing using aliases
    • Minor bug fixes
    Version 1.0
    • Initial release
     
  2. Offline

    TheTester1

    Testing ATM
     
  3. Offline

    AJCStriker

    isnt this the same as /nick in essentials?
     
  4. Offline

    TheTester1

    I Keep Getting Error:

    (MyNamesPlayerListener.java:22)
    at org.bukkit.plugin.java.JavaPluginLoader$5.execute(JavaPluginLoader.java:272)
    at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:58)
    at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:332)
    at net.minecraft.server.NetServerHandler.handleCommand(NetServerHandler.java:706)
    at net.minecraft.server.NetServerHandler.chat(NetServerHandler.java:677)
    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)
    2011-07-23 13:52:51 [SEVERE] Could not pass event PLAYER_COMMAND_PREPROCESS to MyNames
    java.lang.NullPointerException
    at com.imjake9.mynames.MyNamesPlayerListener.onPlayerCommandPreprocess(MyNamesPlayerListener.java:22)
    at org.bukkit.plugin.java.JavaPluginLoader$5.execute(JavaPluginLoader.java:272)
    at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:58)
    at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:332)
    at net.minecraft.server.NetServerHandler.handleCommand(NetServerHandler.java:706)
    at net.minecraft.server.NetServerHandler.chat(NetServerHandler.java:677)
    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)
    2011-07-23 13:52:56 [SEVERE] Could not pass event PLAYER_COMMAND_PREPROCESS to MyNames
    java.lang.NullPointerException
    at com.imjake9.mynames.MyNamesPlayerListener.onPlayerCommandPreprocess(MyNamesPlayerListener.java:22)
    at org.bukkit.plugin.java.JavaPluginLoader$5.execute(JavaPluginLoader.java:272)
    at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:58)
    at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:332)
    at net.minecraft.server.NetServerHandler.handleCommand(NetServerHandler.java:706)
    at net.minecraft.server.NetServerHandler.chat(NetServerHandler.java:677)
    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)
    2011-07-23 13:53:00 [SEVERE] Could not pass event PLAYER_COMMAND_PREPROCESS to MyNames
    java.lang.NullPointerException
    at com.imjake9.mynames.MyNamesPlayerListener.onPlayerCommandPreprocess(MyNamesPlayerListener.java:22)
    at org.bukkit.plugin.java.JavaPluginLoader$5.execute(JavaPluginLoader.java:272)
    at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:58)
    at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:332)
    at net.minecraft.server.NetServerHandler.handleCommand(NetServerHandler.java:706)
    at net.minecraft.server.NetServerHandler.chat(NetServerHandler.java:677)
    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)
    2011-07-23 13:53:06 [SEVERE] Could not pass event PLAYER_COMMAND_PREPROCESS to MyNames
    java.lang.NullPointerException
    at com.imjake9.mynames.MyNamesPlayerListener.onPlayerCommandPreprocess(MyNamesPlayerListener.java:22)
    at org.bukkit.plugin.java.JavaPluginLoader$5.execute(JavaPluginLoader.java:272)
    at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:58)
    at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:332)
    at net.minecraft.server.NetServerHandler.handleCommand(NetServerHandler.java:706)
    at net.minecraft.server.NetServerHandler.chat(NetServerHandler.java:677)
    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)
    2011-07-23 13:53:06 [SEVERE] Could not pass event PLAYER_COMMAND_PREPROCESS to MyNames
    java.lang.NullPointerException
    at com.imjake9.mynames.MyNamesPlayerListener.onPlayerCommandPreprocess(MyNamesPlayerListener.java:22)
    at org.bukkit.plugin.java.JavaPluginLoader$5.execute(JavaPluginLoader.java:272)
    at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:58)
    at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:332)
    at net.minecraft.server.NetServerHandler.handleCommand(NetServerHandler.java:706)
    at net.minecraft.server.NetServerHandler.chat(NetServerHandler.java:677)
    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)

    Idk if thats because i was not using permissions or if it was the same error
    i think it may be more than two but i think its all
    because my server
     
  5. Offline

    imjake9

    Ok, I see the problem, but I'm away from my computer and won't be back till late today. Until then, sorry! Thanks for the bug report.
     
  6. Offline

    popa_qwerty

    Can you pleases make it so that you can see the Alias in chat
     
  7. Offline

    imjake9

    Alright, updated to version 1.1. Everything should be working now. Also:

    As in, the aliases get replaced even in normal chat? I could certainly add it as an option.
     
  8. Offline

    popa_qwerty

    Yes that is exactly what I'm asking for also can you make it compatible with ichat but not necessary
     
  9. Offline

    imjake9

    And done! Version 1.2 now has an option to parse normal chat. Just tweak the config file.
     
  10. Offline

    Adv

    Isn't working for me. This is the error I'm getting in-game http://snpr.cm/PLLzMf.png and the console error:
    I'm using CommandBook and trying to simply /tp nick and get the above. I have my settings set to true for chat and false for using bukkitpermissions (I'm using Permissions 2.7). Also your chat option doesn't seem to support HeroChat, can you add that please? Lastly, your plugin seems to convert any case changes to lowecase, case support would be great too.
     
  11. Offline

    imjake9

    Thanks for the bug report, it's now fixed, just download version 1.2.1. As for HeroChat incompatibility, that's odd. As far as I know, there nothing that should conflict. Could you tell me exactly what's wrong?

    Finally, I'd just like to point out that the conversion to lowercase is one, only for the thing to be replaced. So, what I mean is that the username to replace is lowercase, but the replacement text is actually the same case you put in.
    This is only done to make the alias case-insensitive. So, if have an alias [Test -> mrBob], then using test, Test, TEST, or even tEsT will work. Anyway, that's never really displayed anyway, so I don't think it's too much of a problem.
     
  12. Offline

    Adv

    I downloaded 1.2.1 and updated it, but I am getting this error still: http://snpr.cm/XoR3jS.png Not sure why the nick name isn't working in HeroChat. Imo, this is the first chat nick system done right (even though it didn't start off as a chat nick system). A nick name which only effects chat is pointless because then you have to either constantly lookup real names or ask for real names when trying to tp or give someone items etc. Hopefully w.e that error is I'm getting can be worked out so I can finally move away from DispNameChanger.
     
  13. Does this work with iChat? I have it set to displayname and not name.

    EDIT: Also, this doesn't work with iConomy.

    EDIT2: This happens for /tp and /msg (CommandBook) as well. They all say 'You cannot use that alias because null is a real player'.
     
  14. Offline

    sfxworks

    ..Could I give them no name so their names wouldn't show in game? Or is there a plugin for that?
     
  15. Offline

    DallyLolli

    This is happening to us too. We cannot use ANY aliases. Which sucks, because this is the plug-in I looked forward to most. Really needs a fix.
     
  16. Offline

    chisox8

    Same as above! I can't use any aliases without getting that message! It just says: 'You cannot use that alias because [player] is a real player'

    Please fix... or does anybody else know a plugin that allows command aliases?
     
  17. Offline

    GameFreakDude

    Amazingly, SimpleAlias still works alright, despite being over 1000 revisions behind.
     

Share This Page