Interface IColonyPackageManager
- All Known Implementing Classes:
ColonyPackageManager
public interface IColonyPackageManager
Colony package manager, responsible to update views etc.
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddCloseSubscriber(@NotNull net.minecraft.server.level.ServerPlayer subscriber) Add a new subscriber to the colony.voidaddImportantColonyPlayer(@NotNull net.minecraft.server.level.ServerPlayer subscriber) Adds a new global subscriber to the colony.Set<net.minecraft.server.level.ServerPlayer>Get all subscribers.Set<net.minecraft.server.level.ServerPlayer>Returns the global subscribers.intGet the last contact in hours from the colony.voidremoveCloseSubscriber(@NotNull net.minecraft.server.level.ServerPlayer player) Remove a subscriber from the colony.voidremoveImportantColonyPlayer(@NotNull net.minecraft.server.level.ServerPlayer subscriber) Removes an global subscriber from the colony.voidUpdate the colony view.voidSends packages to update the permissions.voidSends packages to update the workOrders.voidsetDirty()Mark the package manager dirty.voidsetLastContactInHours(int lastContactInHours) Set the last contact in hours.voidUpdates the time the players were away from the colony.voidUpdate Subscribers with Colony, Citizen, and AbstractBuilding Views.
-
Method Details
-
getLastContactInHours
int getLastContactInHours()Get the last contact in hours from the colony.- Returns:
- the integer.
-
setLastContactInHours
void setLastContactInHours(int lastContactInHours) Set the last contact in hours.- Parameters:
lastContactInHours- the number to set.
-
getCloseSubscribers
Set<net.minecraft.server.level.ServerPlayer> getCloseSubscribers()Get all subscribers.- Returns:
- a copy of the hashset.
-
updateSubscribers
void updateSubscribers()Update Subscribers with Colony, Citizen, and AbstractBuilding Views. -
updateAwayTime
void updateAwayTime()Updates the time the players were away from the colony. -
sendColonyViewPackets
void sendColonyViewPackets()Update the colony view. -
sendPermissionsPackets
void sendPermissionsPackets()Sends packages to update the permissions. -
sendWorkOrderPackets
void sendWorkOrderPackets()Sends packages to update the workOrders. -
setDirty
void setDirty()Mark the package manager dirty. -
addCloseSubscriber
void addCloseSubscriber(@NotNull @NotNull net.minecraft.server.level.ServerPlayer subscriber) Add a new subscriber to the colony.- Parameters:
subscriber- the subscriber to add.
-
addImportantColonyPlayer
void addImportantColonyPlayer(@NotNull @NotNull net.minecraft.server.level.ServerPlayer subscriber) Adds a new global subscriber to the colony.- Parameters:
subscriber- the subscriber to add.
-
removeImportantColonyPlayer
void removeImportantColonyPlayer(@NotNull @NotNull net.minecraft.server.level.ServerPlayer subscriber) Removes an global subscriber from the colony.- Parameters:
subscriber- the subscriber to remove.
-
removeCloseSubscriber
void removeCloseSubscriber(@NotNull @NotNull net.minecraft.server.level.ServerPlayer player) Remove a subscriber from the colony.- Parameters:
player- the subscriber to remove.
-
getImportantColonyPlayers
Set<net.minecraft.server.level.ServerPlayer> getImportantColonyPlayers()Returns the global subscribers.- Returns:
- global subscribers
-