mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2025-01-04 15:38:00 +01:00
Fixed bug where new /island was doing /go as well.
This commit is contained in:
parent
921d25c2d5
commit
487328950b
@ -51,6 +51,7 @@ public class IslandCommand extends CompositeCommand {
|
|||||||
if (subCreate.isPresent()) {
|
if (subCreate.isPresent()) {
|
||||||
subCreate.get().execute(user, new ArrayList<>());
|
subCreate.get().execute(user, new ArrayList<>());
|
||||||
}
|
}
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
Optional<CompositeCommand> go = getSubCommand("go");
|
Optional<CompositeCommand> go = getSubCommand("go");
|
||||||
// Otherwise, currently, just go home
|
// Otherwise, currently, just go home
|
||||||
|
@ -73,10 +73,12 @@ public class Island implements DataObject {
|
|||||||
|
|
||||||
//// Team ////
|
//// Team ////
|
||||||
private UUID owner;
|
private UUID owner;
|
||||||
|
|
||||||
private HashMap<UUID, Integer> members = new HashMap<>();
|
private HashMap<UUID, Integer> members = new HashMap<>();
|
||||||
|
|
||||||
//// State ////
|
//// State ////
|
||||||
private boolean locked = false;
|
private boolean locked = false;
|
||||||
|
|
||||||
private boolean spawn = false;
|
private boolean spawn = false;
|
||||||
|
|
||||||
private boolean purgeProtected = false;
|
private boolean purgeProtected = false;
|
||||||
@ -86,10 +88,10 @@ public class Island implements DataObject {
|
|||||||
private HashMap<Flag, Integer> flags = new HashMap<>();
|
private HashMap<Flag, Integer> flags = new HashMap<>();
|
||||||
|
|
||||||
private int levelHandicap;
|
private int levelHandicap;
|
||||||
|
|
||||||
private Location spawnPoint;
|
private Location spawnPoint;
|
||||||
|
|
||||||
public Island() {}
|
public Island() {}
|
||||||
|
|
||||||
public Island(Location location, UUID owner, int protectionRange) {
|
public Island(Location location, UUID owner, int protectionRange) {
|
||||||
setOwner(owner);
|
setOwner(owner);
|
||||||
createdDate = System.currentTimeMillis();
|
createdDate = System.currentTimeMillis();
|
||||||
@ -113,7 +115,6 @@ public class Island implements DataObject {
|
|||||||
members.put(playerUUID, RanksManager.MEMBER_RANK);
|
members.put(playerUUID, RanksManager.MEMBER_RANK);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Adds target to a list of banned players for this island. May be blocked by the event being cancelled.
|
* Adds target to a list of banned players for this island. May be blocked by the event being cancelled.
|
||||||
* If the player is a member, coop or trustee, they will be removed from those lists.
|
* If the player is a member, coop or trustee, they will be removed from those lists.
|
||||||
@ -154,7 +155,6 @@ public class Island implements DataObject {
|
|||||||
public long getCreatedDate(){
|
public long getCreatedDate(){
|
||||||
return createdDate;
|
return createdDate;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the rank needed to bypass this Island Guard flag
|
* Gets the rank needed to bypass this Island Guard flag
|
||||||
* @param flag
|
* @param flag
|
||||||
@ -213,28 +213,28 @@ public class Island implements DataObject {
|
|||||||
/**
|
/**
|
||||||
* @return the minProtectedX
|
* @return the minProtectedX
|
||||||
*/
|
*/
|
||||||
public int getMinProtectedX() {
|
public final int getMinProtectedX() {
|
||||||
return minProtectedX;
|
return minProtectedX;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return the minProtectedZ
|
* @return the minProtectedZ
|
||||||
*/
|
*/
|
||||||
public int getMinProtectedZ() {
|
public final int getMinProtectedZ() {
|
||||||
return minProtectedZ;
|
return minProtectedZ;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return the minX
|
* @return the minX
|
||||||
*/
|
*/
|
||||||
public int getMinX() {
|
public final int getMinX() {
|
||||||
return minX;
|
return minX;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return the minZ
|
* @return the minZ
|
||||||
*/
|
*/
|
||||||
public int getMinZ() {
|
public final int getMinZ() {
|
||||||
return minZ;
|
return minZ;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -397,13 +397,6 @@ public class Island implements DataObject {
|
|||||||
return center.getBlockZ();
|
return center.getBlockZ();
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean inIslandSpace(Location location) {
|
|
||||||
if (Util.inWorld(location)) {
|
|
||||||
return inIslandSpace(location.getBlockX(), location.getBlockZ());
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks if coords are in the island space
|
* Checks if coords are in the island space
|
||||||
* @param x
|
* @param x
|
||||||
@ -415,6 +408,13 @@ public class Island implements DataObject {
|
|||||||
return x >= minX && x < minX + range*2 && z >= minZ && z < minZ + range*2;
|
return x >= minX && x < minX + range*2 && z >= minZ && z < minZ + range*2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean inIslandSpace(Location location) {
|
||||||
|
if (Util.inWorld(location)) {
|
||||||
|
return inIslandSpace(location.getBlockX(), location.getBlockZ());
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks if the coords are in island space
|
* Checks if the coords are in island space
|
||||||
* @param blockCoord
|
* @param blockCoord
|
||||||
@ -595,7 +595,6 @@ public class Island implements DataObject {
|
|||||||
this.minX = minX;
|
this.minX = minX;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param minZ the minZ to set
|
* @param minZ the minZ to set
|
||||||
*/
|
*/
|
||||||
|
Loading…
Reference in New Issue
Block a user