diff --git a/src/main/java/cr0s/warpdrive/Commons.java b/src/main/java/cr0s/warpdrive/Commons.java index c7450636..66af2fe5 100644 --- a/src/main/java/cr0s/warpdrive/Commons.java +++ b/src/main/java/cr0s/warpdrive/Commons.java @@ -51,14 +51,14 @@ public class Commons { .replaceAll("(" + CHAR_FORMATTING + ".)", ""); } - public static void addChatMessage(final ICommandSender sender, final String message) { - if (sender == null) { - WarpDrive.logger.error("Unable to send message to NULL sender: " + message); + public static void addChatMessage(final ICommandSender commandSender, final String message) { + if (commandSender == null) { + WarpDrive.logger.error("Unable to send message to NULL commandSender: " + message); return; } final String[] lines = updateEscapeCodes(message).split("\n"); for (String line : lines) { - sender.addChatMessage(new ChatComponentText(line)); + commandSender.addChatMessage(new ChatComponentText(line)); } // logger.info(message); diff --git a/src/main/java/cr0s/warpdrive/block/movement/TileEntityShipController.java b/src/main/java/cr0s/warpdrive/block/movement/TileEntityShipController.java index 3343be48..3e6b52a4 100644 --- a/src/main/java/cr0s/warpdrive/block/movement/TileEntityShipController.java +++ b/src/main/java/cr0s/warpdrive/block/movement/TileEntityShipController.java @@ -579,7 +579,7 @@ public class TileEntityShipController extends TileEntityAbstractInterfaced imple if (arguments.length == 1) { this.nameTarget = (String) arguments[0]; } - return new Object[] {nameTarget}; + return new Object[] { nameTarget }; } @Override diff --git a/src/main/java/cr0s/warpdrive/block/movement/TileEntityShipCore.java b/src/main/java/cr0s/warpdrive/block/movement/TileEntityShipCore.java index 79561893..5be1737a 100644 --- a/src/main/java/cr0s/warpdrive/block/movement/TileEntityShipCore.java +++ b/src/main/java/cr0s/warpdrive/block/movement/TileEntityShipCore.java @@ -432,11 +432,11 @@ public class TileEntityShipCore extends TileEntityAbstractEnergy implements ISta for (int i = 0; i < controller.players.size(); i++) { final String playerName = controller.players.get(i); - final EntityPlayerMP player = MinecraftServer.getServer().getConfigurationManager().func_152612_a(playerName); + final EntityPlayerMP entityPlayerMP = MinecraftServer.getServer().getConfigurationManager().func_152612_a(playerName); - if ( player != null - && isOutsideBB(aabb, MathHelper.floor_double(player.posX), MathHelper.floor_double(player.posY), MathHelper.floor_double(player.posZ))) { - summonPlayer(player); + if ( entityPlayerMP != null + && isOutsideBB(aabb, MathHelper.floor_double(entityPlayerMP.posX), MathHelper.floor_double(entityPlayerMP.posY), MathHelper.floor_double(entityPlayerMP.posZ)) ) { + summonPlayer(entityPlayerMP); } } } @@ -446,11 +446,11 @@ public class TileEntityShipCore extends TileEntityAbstractEnergy implements ISta for (int i = 0; i < controller.players.size(); i++) { final String playerName = controller.players.get(i); - final EntityPlayerMP player = MinecraftServer.getServer().getConfigurationManager().func_152612_a(playerName); + final EntityPlayerMP entityPlayerMP = MinecraftServer.getServer().getConfigurationManager().func_152612_a(playerName); - if ( player != null && playerName.equals(nickname) - && isOutsideBB(aabb, MathHelper.floor_double(player.posX), MathHelper.floor_double(player.posY), MathHelper.floor_double(player.posZ))) { - summonPlayer(player); + if ( entityPlayerMP != null && playerName.equals(nickname) + && isOutsideBB(aabb, MathHelper.floor_double(entityPlayerMP.posX), MathHelper.floor_double(entityPlayerMP.posY), MathHelper.floor_double(entityPlayerMP.posZ)) ) { + summonPlayer(entityPlayerMP); return; } } diff --git a/src/main/java/cr0s/warpdrive/config/Dictionary.java b/src/main/java/cr0s/warpdrive/config/Dictionary.java index 2ffe526a..7e5f2613 100644 --- a/src/main/java/cr0s/warpdrive/config/Dictionary.java +++ b/src/main/java/cr0s/warpdrive/config/Dictionary.java @@ -211,7 +211,7 @@ public class Dictionary { + "- NoMass: this entity doesn't count when calculating ship volume/mass (default: Galacticraft air bubble).\n" + "- LeftBehind: this entity won't move with your ship (default: Galacticraft air bubble).\n" + "- NonLivingTarget: this non-living entity can be targeted/removed by weapons (default: ItemFrame, Painting).\n" - + "- LivingWithoutAir: this living entity doesn't need air to live (default: vanilla zombies and skeletons."); + + "- LivingWithoutAir: this living entity doesn't need air to live (default: vanilla zombies and skeletons)."); ConfigCategory categoryEntityTags = config.getCategory("entity_tags"); String[] taggedEntitiesName = categoryEntityTags.getValues().keySet().toArray(new String[0]);