Quick event question

Discussion in 'Plugin Development' started by Hacksore, Aug 22, 2011.

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

    Hacksore

    Just a quick question. Will the blocking the login event when a user is banned stop the message in chat as well.

    Here is my method just wondering if my above question is true or is there other things that are needed.
    Code:
        public void onPlayerLogin(PlayerLoginEvent event) {
            boolean isbanned = spambuster.isBanned(event.getPlayer().getName());
            if (isbanned) {
                event.disallow(PlayerLoginEvent.Result.KICK_BANNED,"You have been banned for leave spam!");
            }
        }
    If you are curious about what the plugin is for it's to stop the leave spam exploit.
     
  2. Offline

    sddddgjd

    It should,since AFAIK the message in broadcasted in onPlayerJoin,which is after login!
     
  3. Offline

    Hacksore

    I just used my brothers account to wait in the server and tried joining while banned on my account. It does indeed block the message if you disallow the event, thanks though.
     
Thread Status:
Not open for further replies.

Share This Page