mirror of
https://github.com/songoda/FabledSkyBlock.git
synced 2024-12-18 06:38:26 +01:00
Added ability to create island without GUI.
This commit is contained in:
parent
d1d0a3dc24
commit
fec32fd8ea
@ -33,11 +33,20 @@ public class CreateCommand extends SubCommand {
|
||||
|
||||
Config config = fileManager.getConfig(new File(skyblock.getDataFolder(), "language.yml"));
|
||||
FileConfiguration configLoad = config.getFileConfiguration();
|
||||
|
||||
if (islandManager.getIsland(player) == null) {
|
||||
Config mainConfig = fileManager.getConfig(new File(skyblock.getDataFolder(), "config.yml"));
|
||||
|
||||
if (mainConfig.getFileConfiguration().getBoolean("Island.Creation.Menu.Enable")) {
|
||||
if (args.length == 1) {
|
||||
Structure structure = skyblock.getStructureManager().getStructure(args[0]);
|
||||
|
||||
if (structure != null && islandManager.createIsland(player, structure)) {
|
||||
messageManager.sendMessage(player, configLoad.getString("Island.Creator.Selector.Created.Message"));
|
||||
soundManager.playSound(player, Sounds.NOTE_PLING.bukkitSound(), 1.0F, 1.0F);
|
||||
} else if (structure == null) {
|
||||
messageManager.sendMessage(player, configLoad.getString("Command.Island.Create.StructureNotFound.Message"));
|
||||
soundManager.playSound(player, Sounds.VILLAGER_NO.bukkitSound(), 1.0F, 1.0F);
|
||||
}
|
||||
} else if (mainConfig.getFileConfiguration().getBoolean("Island.Creation.Menu.Enable")) {
|
||||
Creator.getInstance().open(player);
|
||||
soundManager.playSound(player, Sounds.CHEST_OPEN.bukkitSound(), 1.0F, 1.0F);
|
||||
} else {
|
||||
|
@ -890,8 +890,10 @@ Command:
|
||||
Create:
|
||||
Owner:
|
||||
Message: '&bSkyBlock &8| &cError&8: &eYou are already an Island Owner.'
|
||||
StructureNotFound:
|
||||
Message: '&bSkyBlock &8| &cError&8: &eNo Island structure with such a name.'
|
||||
Info:
|
||||
Message: '&f&oOpens the Island Creator menu.'
|
||||
Message: '&f&oOpens the Island Creator menu. You can also enter a Structure name to instantly create an Island.'
|
||||
Members:
|
||||
Info:
|
||||
Message: '&f&oOpen the Island Members menu.'
|
||||
|
Loading…
Reference in New Issue
Block a user