mirror of
https://github.com/songoda/FabledSkyBlock.git
synced 2024-11-27 20:56:05 +01:00
Add message for preview and do not preview if user has an island
This commit is contained in:
parent
f32d96ef31
commit
f29c28e037
@ -9,7 +9,6 @@ import com.songoda.skyblock.structure.Structure;
|
||||
import com.songoda.skyblock.utils.version.Sounds;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.GameMode;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.command.ConsoleCommandSender;
|
||||
import org.bukkit.configuration.file.FileConfiguration;
|
||||
import org.bukkit.entity.Player;
|
||||
@ -62,12 +61,17 @@ public class PreviewCommand extends SubCommand {
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// Do not preview if user has an island
|
||||
if (island != null) {
|
||||
skyblock.getMessageManager().sendMessage(player, configLang.getString("Island.Preview.Island.Message"));
|
||||
return;
|
||||
}
|
||||
Structure structure = skyblock.getStructureManager().getStructure(args[0]);
|
||||
if(structure == null) {
|
||||
skyblock.getMessageManager().sendMessage(player, configLang.getString("Island.Creator.File.Message"));
|
||||
skyblock.getMessageManager().sendMessage(player, configLang.getString("Island.Preview.File.Message"));
|
||||
return;
|
||||
}
|
||||
skyblock.getIslandManager().previewIsland(player, skyblock.getStructureManager().getStructure(args[0]));
|
||||
skyblock.getIslandManager().previewIsland(player, structure);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3531,7 +3531,11 @@ Island:
|
||||
Message: '&bSkyBlock &8| &cError&8: &eYou do not have the right to do that on this Island.'
|
||||
Preview:
|
||||
Timeout:
|
||||
Message: '&bSkyBlock &8| &aInfo&8: &eYour time to preview island has expired'
|
||||
Message: '&bSkyBlock &8| &aInfo&8: &eYour time to preview island has expired.'
|
||||
File:
|
||||
Message: '&bSkyBlock &8| &cError&8: &eThis preview doesn''t exist.'
|
||||
Island:
|
||||
Message: '&bSkyBlock &8| &aError&8: &eYou can not preview an island if you already own an island'
|
||||
Hologram:
|
||||
Leaderboard:
|
||||
Votes:
|
||||
|
Loading…
Reference in New Issue
Block a user