Plugin Help Need Per-World Chat formatting [URGENT!]

Discussion in 'Plugin Help/Development/Requests' started by carshalljd, May 24, 2015.

Thread Status:
Not open for further replies.
  1. Offline

    carshalljd

    Hey guys!

    I'm running a hybrid server, and I'm having troubles getting my chat formatted the way I want. I currently have 2 worlds: Factions and MiniGames. I'm using ChatEx right now, and my Format is <Faction><rank><name>. It works fine, but I'd also like for my Minigames world to instead have the Format: <balance><name> (I'm trying to use players' economy balances as a sort of point system). However, to my knowledge, chatex doesn't support having per-world formats. Is there anyway I can do this? Is there a way I can do it with PerWorldPlugins (I.E. Two chat plugins, one enabled for mini games and the other for factions)?

    I don't care what the method you have is, or what plugin it requires, as long as it can get the job done!

    Thanks!
    ~Carshalljd
     
    Last edited: May 25, 2015
  2. Offline

    carshalljd

    Buuuuuuuuhmp
     
  3. Online

    timtower Administrator Administrator Moderator

    @carshalljd My plugin ChatLikeMe does support different formats by permissions. Give different permissions to formats in worlds and you have what you wanted.
     
  4. Offline

    carshalljd

    @timtower Im a little confused as to how you suggest I make this work (might just be me not understanding the plugin). I tried disabling chatEx in my Minigames World, and only Enabling Your plugin in my Minigames World with the format : &7[&dMiniGames&7][&e{money}&7]%s: &f%s, and this doesnt work. Also my config looks a little different from your example one (and my prefixes file is empty). So basically my question is - How should I make this work? Did i do something wrong?

    EDIT - I think I understand what you want me to do, but I don't know how to use permissions with your plugin/set it up.
     
    Last edited: May 26, 2015
  5. Online

    timtower Administrator Administrator Moderator

    @carshalljd My suggestion would use the PermFormats
    You can use those to set different formats with different permissions.
    In order for this to work the way you want though you will need to know how to set per world permissions
     
  6. Offline

    carshalljd

    @timtower Ok so I think I see what your getting at, but I'm not sure what the permissions nodes for your plugin are. I feel like I'm missing a page on your plugin docs or something. My config looks like this right now:

    PermFormat: {&7[&dMiniGames&7][&e{money}&7]%s: &f%s}
    Formats:
    FactionRole:
    format: '[%s]'
    replaces: '{factionrole}'
    *The rest is default values*

    I know how to setup Per-World-Permissions with PEX, but like I said I don't know what permission nodes I should be using with your plugin/how to assign them to certain formats.

    Thanks!
     
  7. Online

    timtower Administrator Administrator Moderator

    @carshalljd
    Code:
    PermFormat:
      minigames: {&7[&dMiniGames&7][&e{money}&7]%s: &f%s}
      factions: {&7[&dFactions&7][&e{money}&7]%s: &f%s}
    Then in the minigames world you give them: chatlikeme.permformat.minigames and in the factions:
    chatlikeme.permformat.factions
     
  8. Offline

    carshalljd

    @timtower I still seem to be doing something wrong... This is what I've done. I disabled ChatEx, and enabled ChatLikeMe for all worlds. I went into CLM(ChatLikeMe)'s config and typed this:

    PermFormat:
    minigames: {&7[&dMiniGames&7][&e{money}&7]%s: &f%s}
    factions: {&7[&r{factionname}&7][&r{permplayerprefix}&7]%s: &f%s}
    skyblock: {&7[&bSkyBlock&7][&e{money}&7]%s: &f%s}
    Formats:
    FactionRole:
    format: '[%s]'
    replaces: '{factionrole}'
    *And so on*


    I then went into my PEX permissions file an added this to my default rank:

    worlds:
    minigames:
    permissions:
    - chatlikeme.permformat.minigames
    world:
    permissions:
    - chatlikeme.permformat.factions
    Askyblock:
    permissions:
    - chatlikeme.permformat.skyblock


    After this I saved my configs, restarted the server, and now my chat is default vanilla chat (with the exception of factions doing its default name prefix), for every world. I also have tried specificaly giving these permissions to certain people but it still doesn't work. Any ideas for where I went wrong?

    Thanks!
     
  9. Online

    timtower Administrator Administrator Moderator

  10. Offline

    carshalljd

    @timtower Alright here is the two of them with that formatting:

    Code:
    PermFormat:
      minigames: {&7[&dMiniGames&7][&e{money}&7]%s: &f%s}
      factions: {&7[&r{factionname}&7][&r{permplayerprefix}&7]%s: &f%s}
      skyblock: {&7[&bSkyBlock&7][&e{money}&7]%s: &f%s}
    Formats:
      FactionRole:
        format: '[%s]'
        replaces: '{factionrole}'
    *And so on*
    
    -------------------------------------------------------------------------------------
    Code:
    worlds:
          minigames:
                   permissions:
                   - chatlikeme.permformat.minigames
          world:
                   permissions:
                   - chatlikeme.permformat.factions
          Askyblock:
                  permissions:
                   - chatlikeme.permformat.skyblock
    
     
  11. Offline

    carshalljd

  12. Offline

    carshalljd

  13. Online

    timtower Administrator Administrator Moderator

    @carshalljd Didn't get alerts from those. Some issues with the system.
    Seems about right to me.
     
  14. Offline

    carshalljd

    @timtower are there any plugins that may be interfering with it? Because the chat does not change from default when I use these settings.
     
  15. Online

    timtower Administrator Administrator Moderator

    @carshalljd Any other chat changing plugin could do that.
     
  16. Offline

    carshalljd

    @timtower I've tried so many things now and nothing changes the chat at all. Heres a list of all my plugins in case you know of any issues people have had in the past:

    -Beheaded
    -BloodParticles
    -BookRules
    -ChatEx (I've disabled this)
    -ChatLikeMe
    -CityWorld
    -CraftConomy3
    -CrateReloaded
    -CreateYourOwnMenus
    -CustomEnchantments
    -DestroyBedrock
    -EAuctions
    -EnjinMinecraftPlugin
    -EZRanksLite
    -Factions
    -GAListener
    -HolographicDisplays
    -JoinCommands
    -McMMO
    -MassiveCore
    -MinigamesLib
    -MGGungame
    -MGConquer
    -MGSkyWars
    -MGSnake
    -MGOITC
    -MGSeaBattle
    -MGSplegg
    -MobArena
    -MultiWorlMoney
    -Multiverse-Core
    -Multiverse-Inventories
    -MgBowBash
    -MyCommand
    -PermissionsEx
    -PerWorldPlugins
    -ShopKeepers
    -Signedit
    -Askyblock
    -TitleOnJoin
    -TNTRun
    -Vault
    -Votifier
    -WorldBorder
    -WorldEdit
    -WorldGuard
     
  17. Online

    timtower Administrator Administrator Moderator

  18. Offline

    Boomer

    Guessing here that you're glossing over a huge blob of yml-parsing errors thrown out by the plugin, making it impossible to import the settings and thus, nothing to display...

    Code:
    PermFormat:
      minigames: {&7[&dMiniGames&7][&e{money}&7]%s: &f%s}
      factions: {&7[&r{factionname}&7][&r{permplayerprefix}&7]%s: &f%s}
      skyblock: {&7[&bSkyBlock&7][&e{money}&7]%s: &f%s}
    
    Just that bit you have there , AS IS, is broken yml -- can't have a colin with a space following it in the middle of an unquoted string.

    Are you seeing errors thrown up during the startup-sequence of the server thrown by parsing problems for that plugin?
     
  19. Offline

    carshalljd

    Code:
    09.06 13:02:40 [Server] INFO at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62) ~[spigot_1.8.3.jar:git-Spigot-dbe012b-61ef214]
    09.06 13:02:40 [Server] INFO at us.Myles.PWP.TransparentListeners.PerWorldPluginLoader$1.execute(PerWorldPluginLoader.java:122) ~[?:?]
    09.06 13:02:40 [Server] INFO org.bukkit.event.EventException
    09.06 13:02:40 [Server] INFO Could not pass event AsyncPlayerChatEvent to ChatLikeMe v0.0.4
    09.06 13:02:40 [Server] ERROR **** THIS IS NOT AN ISSUE TO DO WITH PER WORLD PLUGINS ****
    09.06 13:02:40 [Multicraft] Skipped 13 lines due to rate limit (30/s)
    09.06 13:02:38 [Server] INFO at java.net.URLClassLoader.findClass(Unknown Source) ~[?:1.7.0_51]
    09.06 13:02:38 [Server] INFO at java.security.AccessController.doPrivileged(Native Method) ~[?:1.7.0_51]
    09.06 13:02:38 [Server] INFO at java.net.URLClassLoader$1.run(Unknown Source) ~[?:1.7.0_51]
    09.06 13:02:38 [Server] INFO at java.net.URLClassLoader$1.run(Unknown Source) ~[?:1.7.0_51]
    09.06 13:02:38 [Server] INFO Caused by: java.lang.ClassNotFoundException: com.massivecraft.factions.entity.UPlayer
    09.06 13:02:38 [Server] INFO ... 12 more
    09.06 13:02:38 [Server] INFO at us.Myles.PWP.TransparentListeners.PerWorldPluginLoader$1.execute(PerWorldPluginLoader.java:120) ~[?:?]
    09.06 13:02:38 [Server] INFO at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.7.0_51]
    09.06 13:02:38 [Server] INFO at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_51]
    09.06 13:02:38 [Server] INFO at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_51]
    09.06 13:02:38 [Server] INFO at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.7.0_51]
    09.06 13:02:38 [Server] INFO at nl.timdebrouwer.chatlikeme.listeners.OverrideListener.onChat(OverrideListener.java:21) ~[?:?]
    09.06 13:02:38 [Server] INFO at nl.timdebrouwer.chatlikeme.hooks.factions.FactionRoleHook.translate(FactionRoleHook.java:33) ~[?:?]
    09.06 13:02:38 [Server] INFO Caused by: java.lang.NoClassDefFoundError: com/massivecraft/factions/entity/UPlayer
    09.06 13:02:38 [Server] INFO at java.lang.Thread.run(Unknown Source) [?:1.7.0_51]
    09.06 13:02:38 [Server] INFO at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [?:1.7.0_51]
    09.06 13:02:38 [Server] INFO at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [?:1.7.0_51]
    09.06 13:02:38 [Server] INFO at java.util.concurrent.FutureTask.run(Unknown Source) [?:1.7.0_51]
    09.06 13:02:38 [Server] INFO at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) [?:1.7.0_51]
    09.06 13:02:38 [Server] INFO at net.minecraft.server.v1_8_R2.PacketPlayInChat$1.run(PacketPlayInChat.java:39) [spigot_1.8.3.jar:git-Spigot-dbe012b-61ef214]
    09.06 13:02:38 [Server] INFO at net.minecraft.server.v1_8_R2.PlayerConnection.a(PlayerConnection.java:993) [spigot_1.8.3.jar:git-Spigot-dbe012b-61ef214]
    
    @Boomer Not sure if that's what your looking for. I tried removing the spaces in between the colons but that isn't working.
     
  20. Online

    timtower Administrator Administrator Moderator

    @carshalljd Looks like I am using a different version of Factions to compile ChatLikeMe, not really surprised about that though. What version are you using? And where did you got it?
     
  21. Offline

    carshalljd

  22. Online

    timtower Administrator Administrator Moderator

    @carshalljd Yeah, that was december, 2.7.5, I have 2.2.1 on my machine, will see what I can do for you
     
  23. Offline

    carshalljd

  24. Online

    timtower Administrator Administrator Moderator

  25. Offline

    carshalljd

    @timtower this new one looks a lot nicer, and changes the chat to use this format:
    Code:
     permbasedexample2: '%s &1says &c%s and has {money} dollar'
    I tried editing and setting it to be
    Code:
    minigames: '&7[&dMiniGames&7][&e{money}&7]%s: &f%s'
    factions: '&7[&r{factionname}&7][&r{permplayerprefix}&7]%s: &f%s'
    skyblock: '&7[&bSkyBlock&7][&e{money}&7]%s: &f%s'
    
    However when i restart the server, the config goes right back to its default setting. Any ideas?
     
  26. Online

    timtower Administrator Administrator Moderator

    @carshalljd Didn't change much though, just fixed the errors.
    And edit the config while the server isn't running. My plugins tend to override the config when the server stops.
     
  27. Offline

    carshalljd

    @timtower I've been getting some funky results. So i shut down the server, changed it to what i said above, and it reset the config again. I did the whole process again and it instead gave me this:
    Code:
    PermFormat:
      permbasedexample1: '&f<&c%s&f> &c%s'
      permbasedexample2: '%s &1says &c%s and has {money} dollar'
      factions: '&7[&r{factionname}&7][&r{permplayerprefix}&7]%s: &f%s'
      minigames: '&7[&dMiniGames&7][&e{money}&7]%s &f%s'
      skyblock: '&7[&bSkyBlock&7][&e{money}&7]%s &f%s'
    I tried removing the permbasedxamples again, saving, starting the server, but now it just keeps resseting to that. It also ONLY uses permbasedexample2. I then tried this, in an attempt to juke it out
    Code:
    PermFormat:
      permbasedexample1: '&f<&c%s&f> &c%s'
      factions: '%s &1says &c%s and has {money} dollar'
      minigames: '&7[&dMiniGames&7][&e{money}&7]%s &f%s'
      skyblock: '&7[&bSkyBlock&7][&e{money}&7]%s:  &f%s'
    Logged in after this and it kept giving me that format, so i checked the config and now it resets to this:
    Code:
    PermFormat:
      permbasedexample1: '&f<&c%s&f> &c%s'
      permbasedexample2: '%s &1says &c%s and has {money} dollar'
      factions: '%s &1says &c%s and has {money} dollar'
      minigames: '&7[&dMiniGames&7][&e{money}&7]%s: &f%s'
      skyblock: '&7[&bSkyBlock&7][&e{money}&7]%s:  &f%s'

    EDIT::
    This has something to do with my permissions setup. Although the config does keep changing on me, players with proper permissions receive the correct format. Any suggestions to make op's have the right perms?
     
  28. Online

    timtower Administrator Administrator Moderator

    @carshalljd Redownload, should be changed. And then they somehow have permissions for those formats.
     
  29. Offline

    carshalljd

    Everything works great! Thanks so much @timtower it means a lot
     
    timtower likes this.
  30. Online

    timtower Administrator Administrator Moderator

    @carshalljd Glad that you like it, will make some other small modifications to it and then I will put the new version on dev.bukkit.
     
Thread Status:
Not open for further replies.

Share This Page