mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2024-11-26 12:46:01 +01:00
Fixed /is create creating an island even when the player already had one
This commit is contained in:
parent
7acc8d5401
commit
351dfac3cd
@ -14,8 +14,9 @@ import us.tastybento.bskyblock.config.Settings;
|
|||||||
import us.tastybento.bskyblock.database.managers.island.NewIsland;
|
import us.tastybento.bskyblock.database.managers.island.NewIsland;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author tastybento
|
* /island create - Create an island.
|
||||||
*
|
*
|
||||||
|
* @author Tastybento
|
||||||
*/
|
*/
|
||||||
public class IslandCreateCommand extends CompositeCommand {
|
public class IslandCreateCommand extends CompositeCommand {
|
||||||
|
|
||||||
@ -37,6 +38,7 @@ public class IslandCreateCommand extends CompositeCommand {
|
|||||||
public boolean execute(User user, List<String> args) {
|
public boolean execute(User user, List<String> args) {
|
||||||
if (getIslands().hasIsland(user.getUniqueId())) {
|
if (getIslands().hasIsland(user.getUniqueId())) {
|
||||||
user.sendMessage("general.errors.already-have-island");
|
user.sendMessage("general.errors.already-have-island");
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
if (getPlayers().inTeam(user.getUniqueId())) {
|
if (getPlayers().inTeam(user.getUniqueId())) {
|
||||||
return false;
|
return false;
|
||||||
@ -52,7 +54,6 @@ public class IslandCreateCommand extends CompositeCommand {
|
|||||||
* @param user
|
* @param user
|
||||||
*/
|
*/
|
||||||
protected void createIsland(User user) {
|
protected void createIsland(User user) {
|
||||||
//TODO: Add panels, make a selection.
|
|
||||||
try {
|
try {
|
||||||
NewIsland.builder()
|
NewIsland.builder()
|
||||||
.player(user.getPlayer())
|
.player(user.getPlayer())
|
||||||
|
Loading…
Reference in New Issue
Block a user