Solved Getting players client settings(No libs just solutions or ideas please)

Discussion in 'Plugin Development' started by Lightspeed, Feb 13, 2016.

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


    I would like to be able to get some client settings like chat size if possible.
    I see you can get language and translate with some plugins and would like to know how much data I can get from a player's settings.
  2. Offline


    I don't think this is possible
  3. Offline

    timtower Administrator Administrator Moderator

  4. Offline


    You can not automatically do that. You would need to ask each player for that type of information (E.g. Type the language in chat).
  5. Offline


  6. Offline


    You have their IP, you could do geoIP. It strongly requires a lib though.
  7. Offline


    @mcdorli You could do that by yourself.

    But the work you would have to put in that is.... enormous.
  8. Offline


    EDIT: I already see all the things I can do! : D
    Now I see useful information on the link you sent me.
    I also see that there is a good amount of code to get and intercept these sent packets.
    Could you explain how code like that works?

    EDIT: Netty Injection somthing like that I belive it's called.

    EDIT2 Later than the first: Thanks for the link I think I can create some cool things.
    Last edited: Feb 14, 2016
  9. Offline


    I'd honestly recommend using ProtocolLib at this point as it's made by people that properly know what they are doing, has a great API and will save you huge amounts of time.
    teej107 and Zombie_Striker like this.
  10. Offline


    I'd rather spend my time and learn new things than have someone create code for me :L
    I've seen a tutorial to intercept these packets and it's not difficult at all just some java reflection.
    Last edited: Feb 14, 2016
  11. Offline


    This is like reinvent the wheel. Either you look at the wheel and create extra work for yourself basically coping the original design, or you do it without looking and make yourself guess your way into a successful design.

    Libraries are there for a reason. If you want to learn how to do something a lib already does, simply look at how it does whatever it does, understand it, and use it.
  12. Offline


    @Zombie_Striker I think that is a valid excuse. When you have finished learning, you don't have to rely on other people making the wheels for you.

    @Lightspeed Some people however may not want to learn/don't know how to make wheels so you may not get much help.

    I for one don't really want to learn how to make wheels. I don't see how it would apply to programming Bukkit plugins. Yes I could make my computer roll away but that would be annoying. xD :p
    0566 and Zombie_Striker like this.
  13. Offline


    IIRC you can read (at least most) of the data in the EntityPlayer class, I use NMS code to access the player's language and I've also seen other things like the chat settings and so on, you can't know when they change their settings unless you intercept the packets though, but you can live without intercepting them.
  14. Offline


    I found this
    and think it might help me learn/understand it atleast a bit more even tho it's in german?
    Yes . . . no?
  15. Offline


    @Zombie_Striker That is only correct if the user understands the tool inside out. There is no point for him to recreate something that is already "perfected." But in this case OP doesn't understand, so he wants to learn. If he just went and used that lib then he would basically be using code that he doesn't fully understand.
  16. Offline


    I havn't been here in a long time but, thank you all I can now do this and understand it.

    Or I think anyway simple system.
    Intercept packets>If instance is the packet with info>Cast(Like a player in a command)>Got the instance now I do stuff with it.

    Somthing like that.
Thread Status:
Not open for further replies.

Share This Page