output.writeUUID(widget);
}
public void run(int playerId) {
InGameHUD mainScreen = SpoutClient.getInstance().getActivePlayer().getMainScreen();
PopupScreen popup = mainScreen.getActivePopup();
Widget w = PacketWidget.allWidgets.get(widget);
if (w != null && w.getScreen() != null && !(w instanceof Screen)) {
w.getScreen().removeWidget(w);
}
if (w instanceof PopupScreen && popup.getId().equals(w.getId())) {
// Determine if this is a popup screen and if we need to update it
mainScreen.closePopup();
}
PacketWidget.allWidgets.remove(widget);