mirror of
https://github.com/songoda/FabledSkyBlock.git
synced 2025-03-01 18:11:06 +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 com.songoda.skyblock.utils.version.Sounds;
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.GameMode;
|
import org.bukkit.GameMode;
|
||||||
import org.bukkit.Location;
|
|
||||||
import org.bukkit.command.ConsoleCommandSender;
|
import org.bukkit.command.ConsoleCommandSender;
|
||||||
import org.bukkit.configuration.file.FileConfiguration;
|
import org.bukkit.configuration.file.FileConfiguration;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
@ -62,12 +61,17 @@ public class PreviewCommand extends SubCommand {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
Structure structure = skyblock.getStructureManager().getStructure(args[0]);
|
// Do not preview if user has an island
|
||||||
if(structure == null) {
|
if (island != null) {
|
||||||
skyblock.getMessageManager().sendMessage(player, configLang.getString("Island.Creator.File.Message"));
|
skyblock.getMessageManager().sendMessage(player, configLang.getString("Island.Preview.Island.Message"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
skyblock.getIslandManager().previewIsland(player, skyblock.getStructureManager().getStructure(args[0]));
|
Structure structure = skyblock.getStructureManager().getStructure(args[0]);
|
||||||
|
if(structure == null) {
|
||||||
|
skyblock.getMessageManager().sendMessage(player, configLang.getString("Island.Preview.File.Message"));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
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.'
|
Message: '&bSkyBlock &8| &cError&8: &eYou do not have the right to do that on this Island.'
|
||||||
Preview:
|
Preview:
|
||||||
Timeout:
|
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:
|
Hologram:
|
||||||
Leaderboard:
|
Leaderboard:
|
||||||
Votes:
|
Votes:
|
||||||
|
Loading…
Reference in New Issue
Block a user