aboutsummaryrefslogtreecommitdiff
path: root/src/Java/gtPlusPlus/core/util
diff options
context:
space:
mode:
authorAlkalus <draknyte1@hotmail.com>2017-11-24 17:20:03 +1000
committerAlkalus <draknyte1@hotmail.com>2017-11-24 17:20:03 +1000
commitb5fd7c514de976e5f0b550e751ae3a73001ac67e (patch)
tree3cf44e52935588e228cfa89af9c70d4b81648b97 /src/Java/gtPlusPlus/core/util
parent27a3675ced121616092334e68b8ae2719a86abaf (diff)
downloadGT5-Unofficial-b5fd7c514de976e5f0b550e751ae3a73001ac67e.tar.gz
GT5-Unofficial-b5fd7c514de976e5f0b550e751ae3a73001ac67e.tar.bz2
GT5-Unofficial-b5fd7c514de976e5f0b550e751ae3a73001ac67e.zip
$ Fixed issue where all my blocks allowed mobs to spawn.
% More Work on the Xp Converter. % Formatting.
Diffstat (limited to 'src/Java/gtPlusPlus/core/util')
-rw-r--r--src/Java/gtPlusPlus/core/util/player/PlayerUtils.java31
1 files changed, 17 insertions, 14 deletions
diff --git a/src/Java/gtPlusPlus/core/util/player/PlayerUtils.java b/src/Java/gtPlusPlus/core/util/player/PlayerUtils.java
index 543fd65b71..f1462ba51e 100644
--- a/src/Java/gtPlusPlus/core/util/player/PlayerUtils.java
+++ b/src/Java/gtPlusPlus/core/util/player/PlayerUtils.java
@@ -1,6 +1,9 @@
package gtPlusPlus.core.util.player;
-import java.util.*;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+import java.util.UUID;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
@@ -104,7 +107,7 @@ public class PlayerUtils {
}catch(final NullPointerException e){
e.printStackTrace();
return null;
- }
+ }
if (heldItem != null){
return heldItem;
}
@@ -125,32 +128,32 @@ public class PlayerUtils {
return null;
}
-
- public static Item getItemInPlayersHand(EntityPlayer player){
+
+ public static Item getItemInPlayersHand(final EntityPlayer player){
Item heldItem = null;
- try{heldItem = player.getHeldItem().getItem();
+ try{
+ heldItem = player.getHeldItem().getItem();
}catch(final NullPointerException e){return null;}
if (heldItem != null){
return heldItem;
}
-
return null;
}
-
- public final static EntityPlayer getPlayerEntityByName(String aPlayerName){
- EntityPlayer player = PlayerUtils.getPlayer(aPlayerName);
+
+ public final static EntityPlayer getPlayerEntityByName(final String aPlayerName){
+ final EntityPlayer player = PlayerUtils.getPlayer(aPlayerName);
if (player != null){
return player;
- }
+ }
return null;
}
-
- public final static UUID getPlayersUUIDByName(String aPlayerName){
- EntityPlayer player = PlayerUtils.getPlayer(aPlayerName);
+
+ public final static UUID getPlayersUUIDByName(final String aPlayerName){
+ final EntityPlayer player = PlayerUtils.getPlayer(aPlayerName);
if (player != null){
return player.getUniqueID();
- }
+ }
return null;
}