Help with my plugin

Discussion in 'Spigot Plugin Development' started by Kalobo01, May 16, 2018 at 6:57 PM.

  1. Hello,

    I'm just about to program a Minecraft plugin, and I want to know, for example, how to program when a player entered my server, the server name in a .yml file saved (server: lobby-1 or lobby-2). However, I have not made it yet. Would be cool if you could help me.

    Best regards
    Kalobo01
     
  2. So, you will need a YamlConfiguration for the .yml and a EventListener for PlayerJoinEvent

    Google is a good friend here, as events and config related questions have been answered many times and have good documentations/tutorials around the web.
     
    • Agree Agree x 2
  3. Don't forget to register the listener (;
     
  4. You could do this in one class if you want but I suggest against it. Using multiple class files is better practice! So you would have your Main class and your listener class. Good luck! Feel free to tag me for any help.
     

Share This Page