Add message for interacting with island spawn point

This commit is contained in:
Esophose 2019-02-27 17:11:36 -07:00
parent 399f94009a
commit d3b1426143
2 changed files with 13 additions and 0 deletions

View File

@ -128,6 +128,10 @@ public class Block implements Listener {
.subtract(0.0D, 1.0D, 0.0D))) {
if (configLoad.getBoolean("Island.Spawn.Protection")) {
event.setCancelled(true);
skyblock.getMessageManager().sendMessage(player,
skyblock.getFileManager().getConfig(new File(skyblock.getDataFolder(), "language.yml"))
.getFileConfiguration().getString("Island.SpawnProtection.Break.Message"));
skyblock.getSoundManager().playSound(player, Sounds.VILLAGER_NO.bukkitSound(), 1.0F, 1.0F);
}
}
@ -196,6 +200,10 @@ public class Block implements Listener {
island.getLocation(world, IslandEnvironment.Main).clone().subtract(0.0D, 1.0D, 0.0D))) {
if (configLoad.getBoolean("Island.Spawn.Protection")) {
event.setCancelled(true);
skyblock.getMessageManager().sendMessage(player,
skyblock.getFileManager().getConfig(new File(skyblock.getDataFolder(), "language.yml"))
.getFileConfiguration().getString("Island.SpawnProtection.Place.Message"));
skyblock.getSoundManager().playSound(player, Sounds.VILLAGER_NO.bukkitSound(), 1.0F, 1.0F);
}
}

View File

@ -915,6 +915,11 @@ Island:
Message: "&bSkyBlock &8| &aInfo&8: &eYou have bought the upgrade '&7%upgrade&e'."
Claimed:
Message: "&bSkyBlock &8| &cError&8: &eYou have already claimed that upgrade."
SpawnProtection:
Break:
Message: "&bSkyBlock &8| &cError&8: &eYou cannot break the spawn point of the island."
Place:
Message: "&bSkyBlock &8| &cError&8: &eYou cannot obstruct the spawn point of the island."
Biome:
Cooldown:
Word: