/** * Opens a window with the specified listener. * * @param listener The listener for this interface. * @param windowId The window's id. */ public void openWindow(InterfaceListener listener, int windowId) { closeAndNotify(); this.listener = listener; interfaces.put(InterfaceType.WINDOW, windowId); player.send(new OpenInterfaceEvent(windowId)); }
/** * Opens a window and inventory sidebar with the specified listener. * * @param listener The listener for this interface. * @param windowId The window's id. * @param sidebarId The sidebar's id. */ public void openWindowWithSidebar(InterfaceListener listener, int windowId, int sidebarId) { closeAndNotify(); this.listener = listener; interfaces.put(InterfaceType.WINDOW, windowId); interfaces.put(InterfaceType.SIDEBAR, sidebarId); player.send(new OpenInterfaceSidebarEvent(windowId, sidebarId)); }
public void updateStatistics(final String name, final Number number) { mOwner.send( new Player.Message(Player.ACTION_UPDATE_HERO_STAT, this) { @Override public void extra(Parcel m) { m.writeString(name); m.writeValue(number); } }); Log.v(TAG, "cannot found"); }
public Hero(Player owner, String name) { mOwner = owner; mName = name; mOwner.send( new Player.Message(Player.ACTION_GET_HERO) { @Override public void extra(Parcel m) { m.writeString(mName); } }); notifyChanged(); }
/** * Opens the enter amount dialog. * * @param listener The enter amount listener. */ public void openEnterAmountDialog(EnterAmountListener listener) { this.amountListener = listener; player.send(new EnterAmountEvent()); }
/** Closes the current open interface(s). */ public void close() { closeAndNotify(); player.send(new CloseInterfaceEvent()); }