mirror of
https://github.com/DRE2N/DungeonsXL.git
synced 2024-11-24 19:45:43 +01:00
Do not suppress warnings
This commit is contained in:
parent
ec90e59297
commit
5490b99bf3
@ -111,7 +111,6 @@ public class WorldConfig {
|
||||
}
|
||||
|
||||
// Load & Save
|
||||
@SuppressWarnings("deprecation")
|
||||
public void load(ConfigurationSection configFile) {
|
||||
/* Classes */
|
||||
ConfigurationSection configSectionClasses = configFile.getConfigurationSection("classes");
|
||||
@ -354,7 +353,6 @@ public class WorldConfig {
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
public void save() {
|
||||
if (file == null) {
|
||||
return;
|
||||
|
@ -43,10 +43,9 @@ public class GamePlaceableBlock {
|
||||
this.block = block;
|
||||
|
||||
// Split ids
|
||||
if (!ids.equals("")) {
|
||||
if (!ids.isEmpty()) {
|
||||
String[] splittedIds = ids.split(",");
|
||||
for (String id : splittedIds) {
|
||||
@SuppressWarnings("deprecation")
|
||||
Material material = Material.getMaterial(NumberUtil.parseInt(id));
|
||||
if (material != null) {
|
||||
materials.add(material);
|
||||
@ -72,7 +71,6 @@ public class GamePlaceableBlock {
|
||||
}
|
||||
|
||||
if (block.getType() == Material.WALL_SIGN) {
|
||||
@SuppressWarnings("deprecation")
|
||||
int data = block.getData();
|
||||
switch (data) {
|
||||
case 3:
|
||||
@ -153,7 +151,6 @@ public class GamePlaceableBlock {
|
||||
}
|
||||
|
||||
} else {
|
||||
@SuppressWarnings("deprecation")
|
||||
int data = block.getData();
|
||||
switch (data) {
|
||||
case 0:
|
||||
|
@ -77,7 +77,6 @@ public class GameSign {
|
||||
this.maxGroupsPerGame = maxGroupsPerGame;
|
||||
verticalSigns = (int) Math.ceil((float) (1 + maxGroupsPerGame) / 4);
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
int[] direction = getDirection(this.startSign.getData());
|
||||
directionX = direction[0];
|
||||
directionZ = direction[1];
|
||||
@ -201,7 +200,6 @@ public class GameSign {
|
||||
}
|
||||
|
||||
// Static
|
||||
@SuppressWarnings("deprecation")
|
||||
public static GameSign tryToCreate(Block startSign, String mapName, int maxGames, int maxGroupsPerGame, boolean multiFloor) {
|
||||
World world = startSign.getWorld();
|
||||
int direction = startSign.getData();
|
||||
@ -303,7 +301,6 @@ public class GameSign {
|
||||
return sign;
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
public static boolean isRelativeSign(Block block, int x, int z) {
|
||||
GameSign gameSign = getSign(block.getRelative(x, 0, z));
|
||||
if (gameSign == null) {
|
||||
|
@ -76,7 +76,6 @@ public class GroupSign {
|
||||
this.maxPlayersPerGroup = maxPlayersPerGroup;
|
||||
verticalSigns = (int) Math.ceil((float) (1 + maxPlayersPerGroup) / 4);
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
int[] direction = getDirection(this.startSign.getData());
|
||||
directionX = direction[0];
|
||||
directionZ = direction[1];
|
||||
@ -200,7 +199,6 @@ public class GroupSign {
|
||||
}
|
||||
|
||||
/* Statics */
|
||||
@SuppressWarnings("deprecation")
|
||||
public static GroupSign tryToCreate(Block startSign, String mapName, int maxGroups, int maxPlayersPerGroup, boolean multiFloor) {
|
||||
World world = startSign.getWorld();
|
||||
int direction = startSign.getData();
|
||||
@ -302,7 +300,6 @@ public class GroupSign {
|
||||
return sign;
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
public static boolean isRelativeSign(Block block, int x, int z) {
|
||||
GroupSign groupSign = getSign(block.getRelative(x, 0, z));
|
||||
if (groupSign == null) {
|
||||
|
@ -83,7 +83,6 @@ public class LeaveSign {
|
||||
return false;
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
public static boolean isRelativeSign(Block block, int x, int z) {
|
||||
LeaveSign leaveSign = getSign(block.getRelative(x, 0, z));
|
||||
if (leaveSign == null) {
|
||||
|
@ -117,7 +117,6 @@ public class PlayerListener implements Listener {
|
||||
}
|
||||
}.runTaskLater(plugin, 1L);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (dPlayer.getLives() != -1) {
|
||||
|
@ -65,7 +65,6 @@ public class DMob {
|
||||
}
|
||||
|
||||
/* Statics */
|
||||
@SuppressWarnings("deprecation")
|
||||
public static void onDeath(EntityDeathEvent event) {
|
||||
if (!(event.getEntity() instanceof LivingEntity)) {
|
||||
return;
|
||||
|
@ -68,7 +68,7 @@ public class DMobType {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public void spawn(GameWorld gWorld, Location loc) {
|
||||
public void spawn(GameWorld gameWorld, Location loc) {
|
||||
if (type == null) {
|
||||
return;
|
||||
}
|
||||
@ -77,7 +77,7 @@ public class DMobType {
|
||||
return;
|
||||
}
|
||||
|
||||
LivingEntity entity = (LivingEntity) gWorld.getWorld().spawnEntity(loc, type);
|
||||
LivingEntity entity = (LivingEntity) gameWorld.getWorld().spawnEntity(loc, type);
|
||||
|
||||
/* Set the Items */
|
||||
entity.getEquipment().setItemInHand(ItemHand);
|
||||
@ -112,11 +112,10 @@ public class DMobType {
|
||||
entity.setRemoveWhenFarAway(false);
|
||||
|
||||
/* Spawn Mob */
|
||||
new DMob(entity, gWorld, this);
|
||||
new DMob(entity, gameWorld, this);
|
||||
}
|
||||
|
||||
// Load Config
|
||||
@SuppressWarnings("deprecation")
|
||||
public static Set<DMobType> load(ConfigurationSection configFile) {
|
||||
Set<DMobType> set = new HashSet<>();
|
||||
|
||||
|
@ -825,7 +825,6 @@ public class DPlayer {
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
public void poke(Block block) {
|
||||
if (block.getState() instanceof Sign) {
|
||||
Sign sign = (Sign) block.getState();
|
||||
|
@ -36,8 +36,8 @@ public class BlockSign extends DSign {
|
||||
private byte offBlockData = 0x0;
|
||||
private byte onBlockData = 0x0;
|
||||
|
||||
public BlockSign(Sign sign, GameWorld gworld) {
|
||||
super(sign, gworld);
|
||||
public BlockSign(Sign sign, GameWorld gameWorld) {
|
||||
super(sign, gameWorld);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -45,7 +45,6 @@ public class BlockSign extends DSign {
|
||||
return true;
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
@Override
|
||||
public void onInit() {
|
||||
String lines[] = getSign().getLines();
|
||||
@ -82,7 +81,6 @@ public class BlockSign extends DSign {
|
||||
initialized = true;
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
@Override
|
||||
public void onTrigger() {
|
||||
if (initialized && !active) {
|
||||
@ -91,7 +89,6 @@ public class BlockSign extends DSign {
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
@Override
|
||||
public void onDisable() {
|
||||
if (initialized && active) {
|
||||
|
@ -40,7 +40,6 @@ public class ClassesSign extends DSign {
|
||||
return true;
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
@Override
|
||||
public void onInit() {
|
||||
if (getGameWorld().getConfig().isLobbyDisabled()) {
|
||||
|
@ -41,7 +41,6 @@ public class MobSpawnTask extends BukkitRunnable {
|
||||
this.sign = sign;
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
@Override
|
||||
public void run() {
|
||||
if (sign.getInterval() <= 0) {
|
||||
|
@ -84,7 +84,6 @@ public class RedstoneTrigger extends Trigger {
|
||||
return type;
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
public static RedstoneTrigger getOrCreate(Sign sign, GameWorld gameWorld) {
|
||||
Block rtBlock = null;
|
||||
if (sign.getBlock().getType() == Material.WALL_SIGN) {
|
||||
|
@ -27,7 +27,7 @@ import java.util.Map;
|
||||
*/
|
||||
public class WaveTrigger extends Trigger {
|
||||
|
||||
private static Map<GameWorld, ArrayList<WaveTrigger>> triggers = new HashMap<GameWorld, ArrayList<WaveTrigger>>();
|
||||
private static Map<GameWorld, ArrayList<WaveTrigger>> triggers = new HashMap<>();
|
||||
|
||||
private TriggerType type = TriggerTypeDefault.WAVE;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user