1. Thank you all for taking the time to read this thread! I just need help with a couple of things. First: I need all the /play commands for all the games that /play works with for a mod kinda like this: https://hypixel.net/threads/quickmode-a-simple-minecraft-mod-for-hypixel-typers.1945529/ Second: I need some way to sense a message in chat, such as "aRandomPlayer entered the world," for a housing mod request. The mod will sense the enter message and then it will say "Welcome, aRandomPlayer!" like that. The second time they join, it will say "Wlc back, aRandomPlayer!" somehow with another file on your computer.
     
    #1
  2. Aycy

    Aycy Well-Known Member

    Aycy
    MVP
    Messages:
    619
    https://hypixel.net/threads/guide-play-commands-useful-tools-mods-more.1025608/

    create and register an event handler that listens for the ClientChatReceivedEvent
    Code:
    @SubscribeEvent
    public void onChat(ClientChatReceivedEvent event) {
         if (event.message.getUnformattedText.contains("entered the world")) {
              // parse the player name, save the name to a list, and send a message
         }
    }

    if you want to remember visitors in a single game sitting, add the player names into a visitorList. every time a player joins, check if they are in the list. if they are, send "welcome back!", otherwise send "welcome!"

    if you want to remember visitors across many game openings, also save the player name into a text file. when you start up mc, add the names from the text file into the visitorsList.
     
    #2
    • Like Like x 1
    • Agree Agree x 1

Share This Page