use of com.minecolonies.coremod.network.messages.server.colony.citizen.PauseCitizenMessage in project minecolonies by ldtteam.
the class WindowHireWorker method pauseClicked.
/**
* Pause citizen clicked to pause the citizen.
*
* @param button the clicked button.
*/
private void pauseClicked(@NotNull final Button button) {
final int row = citizenList.getListElementIndexByPane(button);
final int id = citizens.toArray(new CitizenDataView[0])[row].getId();
@NotNull final ICitizenDataView citizen = citizens.get(row);
Network.getNetwork().sendToServer(new PauseCitizenMessage(this.building, id));
citizen.setPaused(!citizen.isPaused());
}
use of com.minecolonies.coremod.network.messages.server.colony.citizen.PauseCitizenMessage in project minecolonies by Minecolonies.
the class WindowHireWorker method pauseClicked.
/**
* Pause citizen clicked to pause the citizen.
*
* @param button the clicked button.
*/
private void pauseClicked(@NotNull final Button button) {
final int row = citizenList.getListElementIndexByPane(button);
final int id = citizens.toArray(new CitizenDataView[0])[row].getId();
@NotNull final ICitizenDataView citizen = citizens.get(row);
Network.getNetwork().sendToServer(new PauseCitizenMessage(this.building, id));
citizen.setPaused(!citizen.isPaused());
}
Aggregations