Skip to content

Commit 40ebbbc

Browse files
committed
Fix build
1 parent 8c9cf94 commit 40ebbbc

File tree

3 files changed

+13
-2
lines changed

3 files changed

+13
-2
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
# eclipse
44
/eclipse
5+
/libraries
56

67
# idea
78
.idea

patches/net/minecraftforge/common/util/FakePlayerFactory.java.patch

+11-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,16 @@
11
--- ../src-base/minecraft/net/minecraftforge/common/util/FakePlayerFactory.java
22
+++ ../src-work/minecraft/net/minecraftforge/common/util/FakePlayerFactory.java
3-
@@ -35,12 +35,24 @@
3+
@@ -17,6 +17,9 @@
4+
private static GameProfile MINECRAFT = new GameProfile(UUID.fromString("41C82C87-7AfB-4024-BA57-13D2C99CAE77"), "[Minecraft]");
5+
// Map of all active fake player usernames to their entities
6+
private static Map<GameProfile, FakePlayer> fakePlayers = Maps.newHashMap();
7+
+ public static Map<GameProfile, FakePlayer> getFakePlayers(){
8+
+ return fakePlayers;
9+
+ }
10+
private static FakePlayer MINECRAFT_PLAYER = null;
11+
12+
public static FakePlayer getMinecraft(WorldServer world)
13+
@@ -35,12 +38,24 @@
414
*/
515
public static FakePlayer get(WorldServer world, GameProfile username)
616
{

src/main/java/org/bukkit/craftbukkit/CraftOfflinePlayer.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ public Player getPlayer() {
147147
return (player.playerNetServerHandler != null) ? player.playerNetServerHandler.getPlayerB() : null; // Cauldron
148148
}
149149
}
150-
EntityPlayer player = net.minecraftforge.common.util.FakePlayerFactory.fakePlayers.get(profile);
150+
EntityPlayer player = net.minecraftforge.common.util.FakePlayerFactory.getFakePlayers().get(profile);
151151
return player != null ? (Player)player.getBukkitEntity() : null;
152152
}
153153

0 commit comments

Comments
 (0)