Improved the API and internal workings
Update things Fix some more things Update once more Refactoring and removing unnecessary null checks Woops Fix Nother fix Moar fix Fix imports Update ItemBindable.java
This commit is contained in:
parent
0a2dfb4fd4
commit
3e50dd4117
28 changed files with 389 additions and 340 deletions
|
@ -1,16 +1,12 @@
|
|||
package WayofTime.bloodmagic.api.util.helper;
|
||||
|
||||
import WayofTime.bloodmagic.api.Constants;
|
||||
|
||||
import com.google.common.base.Strings;
|
||||
import com.google.common.collect.Lists;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.MobEffects;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.potion.Potion;
|
||||
import net.minecraft.potion.PotionEffect;
|
||||
import net.minecraft.server.MinecraftServer;
|
||||
import net.minecraftforge.common.UsernameCache;
|
||||
import net.minecraftforge.common.util.FakePlayer;
|
||||
import net.minecraftforge.fml.common.FMLCommonHandler;
|
||||
|
@ -73,6 +69,14 @@ public class PlayerHelper
|
|||
return stack.getTagCompound().getString(Constants.NBT.OWNER_NAME);
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks whether or not the given player is an "actual" player
|
||||
*
|
||||
* @param player
|
||||
* - The player in question
|
||||
*
|
||||
* @return If the player is fake or not
|
||||
*/
|
||||
public static boolean isFakePlayer(EntityPlayer player)
|
||||
{
|
||||
return player != null && (player instanceof FakePlayer || knownFakePlayers.contains(player.getClass().getCanonicalName()));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue