mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-07-14 08:58:34 +00:00
Added greater coverage for CUI for region adjustments.
This commit is contained in:
@ -82,6 +82,17 @@ public class CuboidRegionSelector implements RegionSelector, CUIPointBasedRegion
|
||||
session.dispatchCUIEvent(player,
|
||||
new SelectionPointEvent(1, pos, getArea()));
|
||||
}
|
||||
|
||||
public void explainRegionAdjust(LocalPlayer player, LocalSession session) {
|
||||
if (pos1 != null) {
|
||||
session.dispatchCUIEvent(player,
|
||||
new SelectionPointEvent(0, pos1, getArea()));
|
||||
}
|
||||
if (pos2 != null) {
|
||||
session.dispatchCUIEvent(player,
|
||||
new SelectionPointEvent(1, pos2, getArea()));
|
||||
}
|
||||
}
|
||||
|
||||
public BlockVector getPrimaryPosition() throws IncompleteRegionException {
|
||||
if (pos1 == null) {
|
||||
|
@ -77,6 +77,9 @@ public class Polygonal2DRegionSelector implements RegionSelector {
|
||||
player.print("Added point #" + region.size() + " at " + pos + ".");
|
||||
}
|
||||
|
||||
public void explainRegionAdjust(LocalPlayer player, LocalSession session) {
|
||||
}
|
||||
|
||||
public BlockVector getPrimaryPosition() throws IncompleteRegionException {
|
||||
if (pos1 == null) {
|
||||
throw new IncompleteRegionException();
|
||||
|
@ -68,6 +68,15 @@ public interface RegionSelector {
|
||||
public void explainSecondarySelection(LocalPlayer player,
|
||||
LocalSession session, Vector pos);
|
||||
|
||||
/**
|
||||
* The the player information about the region's changes. This may resend
|
||||
* all the defining region information if needed.
|
||||
*
|
||||
* @param player
|
||||
* @param session
|
||||
*/
|
||||
public void explainRegionAdjust(LocalPlayer player, LocalSession session);
|
||||
|
||||
/**
|
||||
* Get the primary position.
|
||||
*
|
||||
|
Reference in New Issue
Block a user