diff --git a/Bukkit/src/main/java/com/plotsquared/bukkit/object/BukkitPlayer.java b/Bukkit/src/main/java/com/plotsquared/bukkit/object/BukkitPlayer.java index 00c2850a5..4756abfbd 100644 --- a/Bukkit/src/main/java/com/plotsquared/bukkit/object/BukkitPlayer.java +++ b/Bukkit/src/main/java/com/plotsquared/bukkit/object/BukkitPlayer.java @@ -9,7 +9,6 @@ import com.intellectualcrafters.plot.util.UUIDHandler; import com.plotsquared.bukkit.util.BukkitUtil; import org.bukkit.Effect; import org.bukkit.GameMode; -import org.bukkit.Material; import org.bukkit.WeatherType; import org.bukkit.entity.Player; import org.bukkit.event.player.PlayerTeleportEvent.TeleportCause; @@ -176,7 +175,8 @@ public class BukkitPlayer extends PlotPlayer { @Override public void playMusic(Location location, int id) { - this.player.playEffect(BukkitUtil.getLocation(location), Effect.RECORD_PLAY, Material.getMaterial(id)); + //noinspection deprecation + this.player.playEffect(BukkitUtil.getLocation(location), Effect.RECORD_PLAY, id); } @Override diff --git a/Core/src/main/java/com/intellectualcrafters/plot/flag/FlagManager.java b/Core/src/main/java/com/intellectualcrafters/plot/flag/FlagManager.java index 6a995415c..97c5eb99b 100644 --- a/Core/src/main/java/com/intellectualcrafters/plot/flag/FlagManager.java +++ b/Core/src/main/java/com/intellectualcrafters/plot/flag/FlagManager.java @@ -21,19 +21,20 @@ import java.util.Map; import java.util.Set; /** - * Flag Manager Utility - * + * Flag Manager Utility. */ public class FlagManager { /** - * Some events can be called millions of times each second (e.g. physics) and reusing is a lot faster. + * Some events can be called millions of times each second (e.g. physics) + * and reusing is a lot faster. */ private static final Optional MUTABLE_OPTIONAL; private static Field MUTABLE_OPTIONAL_FIELD; + static { - MUTABLE_OPTIONAL = Optional.of(new Object()); + MUTABLE_OPTIONAL = Optional.of(new Object()); try { MUTABLE_OPTIONAL_FIELD = MUTABLE_OPTIONAL.getClass().getDeclaredField("reference"); MUTABLE_OPTIONAL_FIELD.setAccessible(true); @@ -115,7 +116,7 @@ public class FlagManager { if (i != 0) { flag_string.append(','); } - flag_string.append(flag.getName() + ':' + flag.valueToString(entry.getValue()).replaceAll(":", "¯").replaceAll(",", "´")); + flag_string.append(flag.getName() + ':' + flag.valueToString(entry.getValue()).replaceAll(":", "¯").replaceAll(",", "´")); i++; } return flag_string.toString();