Skip to content

Commit

Permalink
fix porting issue with rally banner
Browse files Browse the repository at this point in the history
  • Loading branch information
Raycoms committed Nov 4, 2024
1 parent b2252cf commit 08c3941
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -212,19 +212,20 @@ public static void toggleBanner(final ItemStack banner, final Player playerIn)
return;
}

boolean activeRaid = false;
if (rallyData.towers().isEmpty())
{
rallyData.withActive(false).writeToItemStack(banner);
MessageUtils.format(COM_MINECOLONIES_BANNER_RALLY_GUARDS_TOOLTIP_EMPTY).sendTo(playerIn);
}
else if (rallyData.active())
{
rallyData.withActive(false).writeToItemStack(banner);
broadcastPlayerToRally(banner, playerIn.getCommandSenderWorld(), null);
MessageUtils.format(TOOL_RALLY_BANNER_DEACTIVATED).sendTo(playerIn);
}
else
{
activeRaid = true;
rallyData.withActive(true).writeToItemStack(banner);
final IColony colony = getColony(banner, playerIn.level());
if (colony != null && colony.getPermissions().hasPermission(playerIn, Action.RALLY_GUARDS))
{
Expand All @@ -240,8 +241,6 @@ else if (rallyData.active())
}
}
}
rallyData.withActive(activeRaid).writeToItemStack(banner);

}

/**
Expand Down

0 comments on commit 08c3941

Please sign in to comment.