Skip to content

Buddy Block

Ta Van Dung edited this page Jun 15, 2016 · 1 revision
import com.tvd12.ezyfox.core.annotation.ServerEventHandler;
import com.tvd12.ezyfox.core.command.Log;
import com.tvd12.ezyfox.core.config.ServerEvent;
import com.tvd12.ezyfox.core.model.ApiBuddy;
import com.tvd12.ezyfox.core.model.ApiZone;
import com.tvd12.ezyfox.core.content.AppContext;

@ServerEventHandler(event = ServerEvent.BUDDY_BLOCK)
public class BuddyBlockHandler {

    public void handle(AppContext context, ApiZone zone, ApiBuddy buddy) {
        context.command(Log.class).from(this)
            .info("user " + buddy.getOwner().getName() + " " + 
                    "blocked " + buddy.getName() + " " + 
                    "from zone " + zone.getName());
    }
    
}

Hello World

Clone this wiki locally