Added whitelist message and moved a closed message

This commit is contained in:
Fabrizio La Rosa 2020-08-01 18:38:34 +02:00
parent 00423eb5e4
commit 975c7c756b
3 changed files with 8 additions and 7 deletions

View File

@ -1222,7 +1222,7 @@ public class IslandManager {
for (Player all : Bukkit.getOnlinePlayers()) {
PlayerData targetPlayerData = plugin.getPlayerDataManager().getPlayerData(all);
if (targetPlayerData != null &&
if (targetPlayerData != null &&
targetPlayerData.getOwner() != null &&
targetPlayerData.getOwner().equals(island.getOwnerUUID())) {
Scoreboard scoreboard = scoreboardManager.getScoreboard(all);
@ -1295,7 +1295,7 @@ public class IslandManager {
if (!island.isCoopPlayer(visitor)) {
Player targetPlayer = Bukkit.getServer().getPlayer(visitor);
LocationUtil.teleportPlayerToSpawn(targetPlayer);
messageManager.sendMessage(targetPlayer, configLoad.getString("Island.Visit.Closed.Island.Message").replace("%player", islandOwnerPlayerName));
messageManager.sendMessage(targetPlayer, configLoad.getString("Island.Visit.Closed.Message").replace("%player", islandOwnerPlayerName));
}
}
}
@ -1322,7 +1322,7 @@ public class IslandManager {
if (!island.isCoopPlayer(visitor) && !island.isPlayerWhitelisted(visitor)) {
Player targetPlayer = Bukkit.getServer().getPlayer(visitor);
LocationUtil.teleportPlayerToSpawn(targetPlayer);
messageManager.sendMessage(targetPlayer, configLoad.getString("Island.Visit.Whitelisted.Island.Message").replace("%player", islandOwnerPlayerName)); // TODO
messageManager.sendMessage(targetPlayer, configLoad.getString("Island.Visit.Whitelisted.Message").replace("%player", islandOwnerPlayerName)); // TODO
}
}
}

View File

@ -217,7 +217,7 @@ public class PlayerDataManager {
return;
} else {
if (messageManager != null)
messageManager.sendMessage(player, configLoad.getString("Island.Visit.Closed.Island.Message").replace("%player", targetPlayerName));
messageManager.sendMessage(player, configLoad.getString("Island.Visit.Closed.Message").replace("%player", targetPlayerName));
}
}
@ -278,7 +278,7 @@ public class PlayerDataManager {
} else {
islandManager.unloadIsland(island, Bukkit.getServer().getOfflinePlayer(visitIslandList));
if (messageManager != null)
messageManager.sendMessage(player, configLoad.getString("Island.Visit.Closed.Island.Message").replace("%player", targetPlayerName));
messageManager.sendMessage(player, configLoad.getString("Island.Visit.Closed.Message").replace("%player", targetPlayerName));
}
}
}

View File

@ -987,8 +987,9 @@ Command:
Invalid:
Message: '&bSkyBlock &8| &cError&8: &eInvalid: /island visit [<player>]'
Closed:
Island:
Message: '&bSkyBlock &8| &aInfo&8: &eThe island you were at closed.'
Message: '&bSkyBlock &8| &aInfo&8: &eThe island you were at is now closed.'
Whitelisted:
Message: '&bSkyBlock &8| &aInfo&8: &eThe island you were at is now whitelisted.'
Help:
Page:
Message: '&bSkyBlock &8| &cError&8: &eThere are not that many pages.'