Skip to content

Buddy Remove

Ta Van Dung edited this page Jun 14, 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_REMOVE)
public class BuddyRemoveHandler {

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

Hello World

Clone this wiki locally