Search in sources :

Example 1 with RestartCitizenMessage

use of com.minecolonies.coremod.network.messages.server.colony.citizen.RestartCitizenMessage in project minecolonies by Minecolonies.

the class WindowHireWorker method restartClicked.

/**
 * Restart citizen clicked to restart its AI.
 *
 * @param button the clicked button.
 */
private void restartClicked(@NotNull final Button button) {
    final int row = citizenList.getListElementIndexByPane(button);
    final int id = citizens.toArray(new CitizenDataView[0])[row].getId();
    Network.getNetwork().sendToServer(new RestartCitizenMessage(this.building, id));
    this.close();
}
Also used : RestartCitizenMessage(com.minecolonies.coremod.network.messages.server.colony.citizen.RestartCitizenMessage)

Example 2 with RestartCitizenMessage

use of com.minecolonies.coremod.network.messages.server.colony.citizen.RestartCitizenMessage in project minecolonies by ldtteam.

the class WindowHireWorker method restartClicked.

/**
 * Restart citizen clicked to restart its AI.
 *
 * @param button the clicked button.
 */
private void restartClicked(@NotNull final Button button) {
    final int row = citizenList.getListElementIndexByPane(button);
    final int id = citizens.toArray(new CitizenDataView[0])[row].getId();
    Network.getNetwork().sendToServer(new RestartCitizenMessage(this.building, id));
    this.close();
}
Also used : RestartCitizenMessage(com.minecolonies.coremod.network.messages.server.colony.citizen.RestartCitizenMessage)

Aggregations

RestartCitizenMessage (com.minecolonies.coremod.network.messages.server.colony.citizen.RestartCitizenMessage)2