public abstract class AbstractAreaSelectionManager extends Manager
Modifier and Type | Class and Description |
---|---|
static class |
AbstractAreaSelectionManager.ClickAction |
static class |
AbstractAreaSelectionManager.ClickResult |
Modifier and Type | Field and Description |
---|---|
protected Map<UUID,SimpleLocation> |
leftPosition |
protected Map<UUID,SimpleLocation> |
rightPosition |
protected Set<UUID> |
selecting |
Constructor and Description |
---|
AbstractAreaSelectionManager(TriggerReactorCore plugin) |
Modifier and Type | Method and Description |
---|---|
protected static SimpleLocation |
getLargest(SimpleLocation left,
SimpleLocation right)
get the largest point between two coordinates.
|
Area |
getSelection(UUID uuid) |
protected static SimpleLocation |
getSmallest(SimpleLocation left,
SimpleLocation right)
get the smallest point between two coordinates.
|
protected AbstractAreaSelectionManager.ClickResult |
onClick(AbstractAreaSelectionManager.ClickAction action,
UUID uuid,
SimpleLocation sloc)
gets called when player clicks on a block.
|
void |
resetSelections(UUID uuid) |
boolean |
toggleSelection(UUID uuid) |
disable, getManagers, reload, saveAll
protected final Map<UUID,SimpleLocation> leftPosition
protected final Map<UUID,SimpleLocation> rightPosition
public AbstractAreaSelectionManager(TriggerReactorCore plugin)
protected static SimpleLocation getSmallest(SimpleLocation left, SimpleLocation right)
left
- coordinate 1right
- coordinate 2protected static SimpleLocation getLargest(SimpleLocation left, SimpleLocation right)
left
- coordinate 1right
- coordinate 2protected AbstractAreaSelectionManager.ClickResult onClick(AbstractAreaSelectionManager.ClickAction action, UUID uuid, SimpleLocation sloc)
action
- the AbstractAreaSelectionManager.ClickAction
associated with this player interaction.uuid
- the uuid of playersloc
- location where interaction occurredAbstractAreaSelectionManager.ClickResult
public boolean toggleSelection(UUID uuid)
player
- public void resetSelections(UUID uuid)