mirror of
https://github.com/songoda/FabledSkyBlock.git
synced 2024-09-15 16:39:59 +02:00
Fix scoreboards and liquid check
This commit is contained in:
parent
586abfab8d
commit
e27b4f86ea
@ -101,7 +101,6 @@ public class Move implements Listener {
|
||||
Island island = islandManager
|
||||
.getIsland(Bukkit.getServer().getOfflinePlayer(playerData.getIsland()));
|
||||
|
||||
|
||||
if (island != null) {
|
||||
if (islandManager.isLocationAtIsland(island, to)) {
|
||||
Config config = fileManager.getConfig(new File(skyblock.getDataFolder(), "config.yml"));
|
||||
@ -117,8 +116,7 @@ public class Move implements Listener {
|
||||
|
||||
if (configLoad.getBoolean("Island.World." + world.name() + ".Liquid.Enable")) {
|
||||
if (to.getY() <= configLoad.getInt("Island.World." + world.name() + ".Liquid.Height")) {
|
||||
if (!configLoad.getBoolean("Island.Liquid.Teleport.Enable")) return;
|
||||
if (keepItemsOnDeath) {
|
||||
if (keepItemsOnDeath && configLoad.getBoolean("Island.Liquid.Teleport.Enable")) {
|
||||
player.setFallDistance(0.0F);
|
||||
|
||||
if (island.hasRole(IslandRole.Member, player.getUniqueId())
|
||||
@ -135,7 +133,6 @@ public class Move implements Listener {
|
||||
soundManager.playSound(player, Sounds.ENDERMAN_TELEPORT.bukkitSound(), 1.0F,
|
||||
1.0F);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -7,6 +7,8 @@ import com.songoda.skyblock.island.IslandManager;
|
||||
import com.songoda.skyblock.island.IslandRole;
|
||||
import com.songoda.skyblock.placeholder.PlaceholderManager;
|
||||
import com.songoda.skyblock.utils.NumberUtil;
|
||||
import com.songoda.skyblock.utils.version.NMSUtil;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.entity.Player;
|
||||
@ -72,8 +74,8 @@ public class Scoreboard {
|
||||
|
||||
String formattedDisplayName = ChatColor.translateAlternateColorCodes('&',
|
||||
replaceDisplayName(displayName));
|
||||
|
||||
if (formattedDisplayName.length() > 32) {
|
||||
int max = NMSUtil.getVersionNumber() > 8 ? 32 : 16;
|
||||
if (formattedDisplayName.length() > max) {
|
||||
obj.setDisplayName(ChatColor.RED + "Too long...");
|
||||
} else {
|
||||
obj.setDisplayName(formattedDisplayName);
|
||||
@ -101,7 +103,7 @@ public class Scoreboard {
|
||||
String formattedDisplayName = ChatColor.translateAlternateColorCodes('&',
|
||||
replaceDisplayName(displayName));
|
||||
|
||||
if (formattedDisplayName.length() > 32) {
|
||||
if (formattedDisplayName.length() > max) {
|
||||
obj.setDisplayName(ChatColor.RED + "Too long...");
|
||||
} else {
|
||||
obj.setDisplayName(formattedDisplayName);
|
||||
|
Loading…
Reference in New Issue
Block a user