use of com.jadarstudios.developercapes.user.UserManager in project Kingdom-Keys-Re-Coded by Wehavecookies56.
the class RenderEventHandler method renderPlayer.
// mmdanggg2: renderPlayerEvent seems to be getting depreciated so this will
// do for now.
@SubscribeEvent
public void renderPlayer(RenderLivingEvent.Pre event) {
if (event.getEntity() instanceof AbstractClientPlayer) {
AbstractClientPlayer player = (AbstractClientPlayer) event.getEntity();
UserManager manager = UserManager.getInstance();
User user = manager.getUser(player.getUniqueID().toString());
if (user == null)
return;
ICape cape = user.capes.get(0);
if (cape == null)
return;
boolean flag = cape.isTextureLoaded(player);
if (!flag)
cape.loadTexture(player);
}
}
Aggregations