Solved Forcing a player to say something in chat on join

Discussion in 'Plugin Development' started by bryansolis13, Jan 29, 2016.

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

    bryansolis13

    I'm trying to make it so when a player joins they say something that is defined for them to say.
    I've searched on the internet but i cant find a solution.

    This is what i have but it doesn't work
    Code:
        @EventHandler
        public void onJoin(PlayerJoinEvent e)
        {
             Player player = e.getPlayer();
             player.chat("Test");
        }
    
     
  2. Offline

    Zombie_Striker

    @bryansolis13
    1. Why?
    2. Put the player somewhere he cannot do anything. Send him a message saying to type the thing in chat. If the player types the message, then teleport him out of that area.
     
  3. Offline

    bryansolis13

    Im working on a theory where ill have the player say "." when they join
    and if it shows the "." then it i will do nothing
    if it dosent show the "." then there hacked client picked it up and it will ban the player
     
  4. Offline

    Zombie_Striker

    @bryansolis13
    Sadly, there is no way to create that type of "Anti-Hack" plugin. First, the period is not sent to the server (it get's filtered out on the client side), and all the player needs to do is type "..[thing]", and the first period will be remove, but not the second one. Meaning the server will still receive ".[thing]", which is the string you're testing for.
     
  5. Offline

    bryansolis13

    @Zombie_Striker
    Ok thanks for the explanation. Like i said i was working off a theory
     
Thread Status:
Not open for further replies.

Share This Page