Class WorldEditAPI
java.lang.Object
java.lang.Thread
sawfowl.regionguard.implementsapi.worldedit.WorldEditAPI
- All Implemented Interfaces:
Runnable
,WorldEditCUIAPI
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandler
-
Field Summary
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetOrCreateUser
(UUID uuid) Creating or getting a WECui user.getOrCreateUser
(org.spongepowered.api.entity.living.player.server.ServerPlayer player) Creating or getting a WECui user.Optional<org.spongepowered.api.world.server.ServerLocation>
getTargetBlock
(org.spongepowered.api.entity.living.player.server.ServerPlayer player, int maxDistance) Location of the block the player is looking at.void
removeUser
(org.spongepowered.api.entity.living.player.server.ServerPlayer player) Removing a WECui user.void
revertVisuals
(org.spongepowered.api.entity.living.player.server.ServerPlayer player, UUID regionUniqueId) Remove border highlighting.void
sendVisualDrag
(org.spongepowered.api.entity.living.player.server.ServerPlayer player, org.spongepowered.math.vector.Vector3i pos) Dynamic selection of the area in the direction of the player's gaze.void
stopVisualDrag
(org.spongepowered.api.entity.living.player.server.ServerPlayer player) Stop the dynamic area selection.void
void
visualizeRegion
(Region region, org.spongepowered.api.entity.living.player.server.ServerPlayer player, boolean investigating, boolean tempRegion) Display the region boundaries.void
visualizeRegion
(Region region, org.spongepowered.math.vector.Vector3i pos1, org.spongepowered.math.vector.Vector3i pos2, org.spongepowered.api.entity.living.player.server.ServerPlayer player, CUIUser user, boolean investigating, boolean tempRegion) Display the region boundaries.void
visualizeRegions
(List<Region> regions, org.spongepowered.api.entity.living.player.server.ServerPlayer player, boolean investigating) Display borders to multiple regions at the same time.Methods inherited from class java.lang.Thread
activeCount, checkAccess, clone, countStackFrames, currentThread, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, onSpinWait, resume, run, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, suspend, toString, yield
-
Constructor Details
-
WorldEditAPI
-
-
Method Details
-
updateCuiDataMaps
public void updateCuiDataMaps() -
getOrCreateUser
public CUIUser getOrCreateUser(org.spongepowered.api.entity.living.player.server.ServerPlayer player) Description copied from interface:WorldEditCUIAPI
Creating or getting a WECui user.- Specified by:
getOrCreateUser
in interfaceWorldEditCUIAPI
-
getOrCreateUser
Description copied from interface:WorldEditCUIAPI
Creating or getting a WECui user.- Specified by:
getOrCreateUser
in interfaceWorldEditCUIAPI
-
removeUser
public void removeUser(org.spongepowered.api.entity.living.player.server.ServerPlayer player) Description copied from interface:WorldEditCUIAPI
Removing a WECui user.- Specified by:
removeUser
in interfaceWorldEditCUIAPI
-
visualizeRegion
public void visualizeRegion(Region region, org.spongepowered.api.entity.living.player.server.ServerPlayer player, boolean investigating, boolean tempRegion) Description copied from interface:WorldEditCUIAPI
Display the region boundaries.- Specified by:
visualizeRegion
in interfaceWorldEditCUIAPI
- Parameters:
region
- - visualization regionplayer
- - the player who needs to display the boundaries of the regioninvestigating
- - checking the region type to change the color of the gridtempRegion
- - whether the region is temporary
-
visualizeRegion
public void visualizeRegion(Region region, org.spongepowered.math.vector.Vector3i pos1, org.spongepowered.math.vector.Vector3i pos2, org.spongepowered.api.entity.living.player.server.ServerPlayer player, CUIUser user, boolean investigating, boolean tempRegion) Description copied from interface:WorldEditCUIAPI
Display the region boundaries.- Specified by:
visualizeRegion
in interfaceWorldEditCUIAPI
- Parameters:
region
- - target regionpos1
- - first positionpos2
- - second positionplayer
- - the player who needs to display the boundaries of the regionuser
- - WECui userinvestigating
- - checking the region type to change the color of the gridtempRegion
- - whether the region is temporary
-
visualizeRegions
public void visualizeRegions(List<Region> regions, org.spongepowered.api.entity.living.player.server.ServerPlayer player, boolean investigating) Description copied from interface:WorldEditCUIAPI
Display borders to multiple regions at the same time.- Specified by:
visualizeRegions
in interfaceWorldEditCUIAPI
- Parameters:
regions
- - список регионов для отображения границplayer
- - the player who needs to display the boundaries of the regionsinvestigating
- - checking the region type to change the color of the grid
-
revertVisuals
public void revertVisuals(org.spongepowered.api.entity.living.player.server.ServerPlayer player, UUID regionUniqueId) Description copied from interface:WorldEditCUIAPI
Remove border highlighting.- Specified by:
revertVisuals
in interfaceWorldEditCUIAPI
- Parameters:
player
- - target playerregionUniqueId
- - specify a specific region, if necessary
-
stopVisualDrag
public void stopVisualDrag(org.spongepowered.api.entity.living.player.server.ServerPlayer player) Description copied from interface:WorldEditCUIAPI
Stop the dynamic area selection.- Specified by:
stopVisualDrag
in interfaceWorldEditCUIAPI
- Parameters:
player
- - target player
-
sendVisualDrag
public void sendVisualDrag(org.spongepowered.api.entity.living.player.server.ServerPlayer player, org.spongepowered.math.vector.Vector3i pos) Description copied from interface:WorldEditCUIAPI
Dynamic selection of the area in the direction of the player's gaze.- Specified by:
sendVisualDrag
in interfaceWorldEditCUIAPI
- Parameters:
player
- - target playerpos
- - position from which the selection will take place in the direction of the view
-
getTargetBlock
public Optional<org.spongepowered.api.world.server.ServerLocation> getTargetBlock(org.spongepowered.api.entity.living.player.server.ServerPlayer player, int maxDistance) Description copied from interface:WorldEditCUIAPI
Location of the block the player is looking at.- Specified by:
getTargetBlock
in interfaceWorldEditCUIAPI
- Parameters:
player
- - target playermaxDistance
- - distance to find the block- Returns:
-