Package de.marcely.bedwars.api.arena
Class QueuedCloningArena
java.lang.Object
de.marcely.bedwars.api.arena.QueuedCloningArena
Represents a queued entry within 
ArenaCloningManager.- 
Constructor SummaryConstructorsConstructorDescriptionQueuedCloningArena(Arena arena) QueuedCloningArena(Arena arena, @Nullable Integer playersPerTeam, boolean ignoreLimits, @Nullable Consumer<Optional<Arena>> callback) 
- 
Method SummaryModifier and TypeMethodDescriptionvoidaddCallback(Consumer<Optional<Arena>> callback) Adds a callback that will be called once the cloning has been finished.@Nullable IntegerGets the players per team amount that will be applied for the cloned arena.getArena()Gets the arena that will be cloned in the future.Gets all callbacks that are being called once the cloning has been finished.booleanWhether certain limitations shall be ignored (seeArenaCloningManager.addToQueue(QueuedCloningArena)).
- 
Constructor Details- 
QueuedCloningArena- Parameters:
- arena- The arena that shall be cloned
- Throws:
- IllegalArgumentException- when playersPerTeam is not null and > 1
 
- 
QueuedCloningArenapublic QueuedCloningArena(Arena arena, @Nullable @Nullable Integer playersPerTeam, boolean ignoreLimits, @Nullable @Nullable Consumer<Optional<Arena>> callback) - Parameters:
- arena- The arena that shall be cloned
- playersPerTeam- The players per team amount that shall be applied for the cloned arena. May be- null
- ignoreLimits- Whether certain limitations shall be ignored (see- ArenaCloningManager.addToQueue(QueuedCloningArena))
- callback- An optional callback that returns the result of the cloning. In case it succeded, the callback will include the cloned arena. It is always being called on the main thread
- Throws:
- IllegalArgumentException- when playersPerTeam is not null and > 1
 
 
- 
- 
Method Details- 
getArenaGets the arena that will be cloned in the future.- Returns:
- The clone that this queue entry hold
 
- 
getApplyingPlayersPerTeamGets the players per team amount that will be applied for the cloned arena.Basically calls Arena.setPlayersPerTeam(int)once the arena has been cloned.nullmeans that the original players per team amount stays as it was.- Returns:
- The players per team amount of the new arena, or nullif it stays the same
 
- 
isIgnoringLimitspublic boolean isIgnoringLimits()Whether certain limitations shall be ignored (seeArenaCloningManager.addToQueue(QueuedCloningArena)).- Returns:
- trueif this entry is ignroing the existing limitations
 
- 
getCallbacksGets all callbacks that are being called once the cloning has been finished.- Returns:
- The list of callbacks
 
- 
addCallbackAdds a callback that will be called once the cloning has been finished.- Parameters:
- callback- The callback to add
 
 
-