mirror of
https://github.com/sekwah41/Advanced-Portals.git
synced 2024-11-25 12:06:17 +01:00
added extra info to world locations
This commit is contained in:
parent
568d2517b6
commit
9407a7329b
@ -55,6 +55,7 @@ command.selector.detailedhelp=Gives you a portal selector to select the regions
|
||||
portal.invalidselection=You must have both pos1 and pos2 selected to create a portal.
|
||||
portal.noname=No name for the portal has been given.
|
||||
portal.takenname=The name given for the portal is already taken.
|
||||
portal.selection.differentworlds=Both the selected points need to be in the same world.
|
||||
|
||||
portal.selector.poschange=\u00A7eYou have selected pos%1$s X:%2$s Y:%3$s Z:%4$s
|
||||
|
||||
|
@ -136,8 +136,12 @@ public class PortalManager {
|
||||
int minY = Math.min(loc1.posY, loc2.posY);
|
||||
int minZ = Math.min(loc1.posZ, loc2.posZ);
|
||||
|
||||
PortalLocation maxLoc = new PortalLocation(maxX, maxY, maxZ);
|
||||
PortalLocation minLoc = new PortalLocation(minX, minY, minZ);
|
||||
if(!loc1.worldName.equalsIgnoreCase(loc2.worldName)) {
|
||||
throw new PortalException(Lang.translate("portal.selection.differentworlds"));
|
||||
}
|
||||
|
||||
PortalLocation maxLoc = new PortalLocation(loc1.worldName, maxX, maxY, maxZ);
|
||||
PortalLocation minLoc = new PortalLocation(loc1.worldName, minX, minY, minZ);
|
||||
|
||||
AdvancedPortal portal = new AdvancedPortal(maxLoc, minLoc);
|
||||
for(PortalTag portalTag : tags) {
|
||||
|
@ -5,8 +5,10 @@ public class PlayerLocation {
|
||||
public final double posX;
|
||||
public final double posY;
|
||||
public final double posZ;
|
||||
public final String worldName;
|
||||
|
||||
public PlayerLocation(double posX, double posY, double posZ) {
|
||||
public PlayerLocation(String worldName, double posX, double posY, double posZ) {
|
||||
this.worldName = worldName;
|
||||
this.posX = posX;
|
||||
this.posY = posY;
|
||||
this.posZ = posZ;
|
||||
|
@ -5,8 +5,10 @@ public class PortalLocation {
|
||||
public final int posX;
|
||||
public final int posY;
|
||||
public final int posZ;
|
||||
public final String worldName;
|
||||
|
||||
public PortalLocation(int posX, int posY, int posZ) {
|
||||
public PortalLocation(String worldName, int posX, int posY, int posZ) {
|
||||
this.worldName = worldName;
|
||||
this.posX = posX;
|
||||
this.posY = posY;
|
||||
this.posZ = posZ;
|
||||
|
Loading…
Reference in New Issue
Block a user