mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2024-12-23 09:47:38 +00:00
Made the fields in Polygonal2DRegion private.
This commit is contained in:
parent
978d499282
commit
b05a72fea1
@ -38,13 +38,13 @@ import com.sk89q.worldedit.data.ChunkStore;
|
|||||||
* @author sk89q
|
* @author sk89q
|
||||||
*/
|
*/
|
||||||
public class Polygonal2DRegion implements Region {
|
public class Polygonal2DRegion implements Region {
|
||||||
protected List<BlockVector2D> points;
|
private List<BlockVector2D> points;
|
||||||
protected BlockVector min;
|
private BlockVector min;
|
||||||
protected BlockVector max;
|
private BlockVector max;
|
||||||
protected int minY;
|
private int minY;
|
||||||
protected int maxY;
|
private int maxY;
|
||||||
protected boolean hasY = false;
|
private boolean hasY = false;
|
||||||
protected LocalWorld world;
|
private LocalWorld world;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Construct the region
|
* Construct the region
|
||||||
@ -52,7 +52,7 @@ public class Polygonal2DRegion implements Region {
|
|||||||
public Polygonal2DRegion() {
|
public Polygonal2DRegion() {
|
||||||
this((LocalWorld) null);
|
this((LocalWorld) null);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Construct the region.
|
* Construct the region.
|
||||||
*
|
*
|
||||||
@ -597,4 +597,12 @@ public class Polygonal2DRegion implements Region {
|
|||||||
public void setWorld(LocalWorld world) {
|
public void setWorld(LocalWorld world) {
|
||||||
this.world = world;
|
this.world = world;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public int getMinY() {
|
||||||
|
return minY;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getMaxY() {
|
||||||
|
return maxY;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -124,18 +124,18 @@ public class Polygonal2DRegionSelector implements RegionSelector, CUIRegion {
|
|||||||
|
|
||||||
session.dispatchCUIEvent(player, new SelectionShapeEvent(getTypeID()));
|
session.dispatchCUIEvent(player, new SelectionShapeEvent(getTypeID()));
|
||||||
session.dispatchCUIEvent(player, new SelectionPoint2DEvent(0, pos, getArea()));
|
session.dispatchCUIEvent(player, new SelectionPoint2DEvent(0, pos, getArea()));
|
||||||
session.dispatchCUIEvent(player, new SelectionMinMaxEvent(region.minY, region.maxY));
|
session.dispatchCUIEvent(player, new SelectionMinMaxEvent(region.getMinY(), region.getMaxY()));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void explainSecondarySelection(LocalPlayer player, LocalSession session, Vector pos) {
|
public void explainSecondarySelection(LocalPlayer player, LocalSession session, Vector pos) {
|
||||||
player.print("Added point #" + region.size() + " at " + pos + ".");
|
player.print("Added point #" + region.size() + " at " + pos + ".");
|
||||||
|
|
||||||
session.dispatchCUIEvent(player, new SelectionPoint2DEvent(region.size() - 1, pos, getArea()));
|
session.dispatchCUIEvent(player, new SelectionPoint2DEvent(region.size() - 1, pos, getArea()));
|
||||||
session.dispatchCUIEvent(player, new SelectionMinMaxEvent(region.minY, region.maxY));
|
session.dispatchCUIEvent(player, new SelectionMinMaxEvent(region.getMinY(), region.getMaxY()));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void explainRegionAdjust(LocalPlayer player, LocalSession session) {
|
public void explainRegionAdjust(LocalPlayer player, LocalSession session) {
|
||||||
session.dispatchCUIEvent(player, new SelectionMinMaxEvent(region.minY, region.maxY));
|
session.dispatchCUIEvent(player, new SelectionMinMaxEvent(region.getMinY(), region.getMaxY()));
|
||||||
}
|
}
|
||||||
|
|
||||||
public BlockVector getPrimaryPosition() throws IncompleteRegionException {
|
public BlockVector getPrimaryPosition() throws IncompleteRegionException {
|
||||||
@ -194,7 +194,7 @@ public class Polygonal2DRegionSelector implements RegionSelector, CUIRegion {
|
|||||||
session.dispatchCUIEvent(player, new SelectionPoint2DEvent(id, points.get(id), getArea()));
|
session.dispatchCUIEvent(player, new SelectionPoint2DEvent(id, points.get(id), getArea()));
|
||||||
}
|
}
|
||||||
|
|
||||||
session.dispatchCUIEvent(player, new SelectionMinMaxEvent(region.minY, region.maxY));
|
session.dispatchCUIEvent(player, new SelectionMinMaxEvent(region.getMinY(), region.getMaxY()));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void describeLegacyCUI(LocalSession session, LocalPlayer player) {
|
public void describeLegacyCUI(LocalSession session, LocalPlayer player) {
|
||||||
|
Loading…
Reference in New Issue
Block a user