Skip to content

Commit

Permalink
Use getDeclaredFields()
Browse files Browse the repository at this point in the history
  • Loading branch information
Techcable committed May 22, 2015
1 parent 0375fa5 commit d449f19
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,8 @@ public Player spawnPlayer(Location toSpawn, String name, NPC npc) {


private Map<UUID, GameProfile> skinMap = new HashMap<>();
private static final Field playerInfoActionField = PacketPlayOutPlayerInfo.class.getFields()[0];
private static final Field playerInfoDataListField = PacketPlayOutPlayerInfo.class.getFields()[1];
private static final Field playerInfoActionField = PacketPlayOutPlayerInfo.class.getDeclaredFields()[0];
private static final Field playerInfoDataListField = PacketPlayOutPlayerInfo.class.getDeclaredFields()[1];
@Override
public boolean setSkin(NPC npc, ProfileUtils.PlayerProfile skinProfile) {
GameProfile profile = makeProfile(npc, skinProfile);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,8 @@ public Player spawnPlayer(Location toSpawn, String name, NPC npc) {


private Map<UUID, GameProfile> skinMap = new HashMap<>();
private static final Field playerInfoActionField = PacketPlayOutPlayerInfo.class.getFields()[0];
private static final Field playerInfoDataListField = PacketPlayOutPlayerInfo.class.getFields()[1];
private static final Field playerInfoActionField = PacketPlayOutPlayerInfo.class.getDeclaredFields()[0];
private static final Field playerInfoDataListField = PacketPlayOutPlayerInfo.class.getDeclaredFields()[1];
@Override
public boolean setSkin(NPC npc, ProfileUtils.PlayerProfile skinProfile) {
GameProfile profile = makeProfile(npc, skinProfile);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,8 @@ public Player spawnPlayer(Location toSpawn, String name, NPC npc) {


private Map<UUID, GameProfile> skinMap = new HashMap<>();
private static final Field playerInfoActionField = PacketPlayOutPlayerInfo.class.getFields()[0];
private static final Field playerInfoDataListField = PacketPlayOutPlayerInfo.class.getFields()[1];
private static final Field playerInfoActionField = PacketPlayOutPlayerInfo.class.getDeclaredFields()[0];
private static final Field playerInfoDataListField = PacketPlayOutPlayerInfo.class.getDeclaredFields()[1];
@Override
public boolean setSkin(NPC npc, ProfileUtils.PlayerProfile skinProfile) {
GameProfile profile = makeProfile(npc, skinProfile);
Expand Down

0 comments on commit d449f19

Please sign in to comment.