Skip to content

Commit 887159d

Browse files
committed
Made commands load only if the built-in system is used.
1 parent c033691 commit 887159d

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/main/java/myessentials/utils/PlayerUtils.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package myessentials.utils;
22

3+
import com.mojang.authlib.GameProfile;
34
import cpw.mods.fml.common.FMLCommonHandler;
45
import cpw.mods.fml.common.registry.GameRegistry;
56
import myessentials.MyEssentialsCore;
@@ -287,4 +288,9 @@ public static EntityPlayer getPlayerFromUUID(UUID uuid) {
287288
}
288289
return null;
289290
}
291+
292+
public static UUID getUUIDFromUsername(String username) {
293+
GameProfile profile = MinecraftServer.getServer().func_152358_ax().func_152655_a(username);
294+
return profile == null ? null : profile.getId();
295+
}
290296
}

0 commit comments

Comments
 (0)