Posted January 23, 201510 yr I realize 1.6.4 is ancient lets just say I have my reasons and move on. I was wondering how i would get a player with a certain username's instance my mobs entity file. i have tried if(MinecraftServer.getServer().getConfigurationManager().getPlayerForUsername(this.getUser()) != null){ this.setLocationAndAngles((double)MinecraftServer.getServer().getConfigurationManager().getPlayerForUsername(this.getUser()).posX + 0.0D, (double)MinecraftServer.getServer().getConfigurationManager().getPlayerForUsername(this.getUser()).posY + 0.0D, (double)MinecraftServer.getServer().getConfigurationManager().getPlayerForUsername(this.getUser()).posZ + 0.0D, 0.0F, 0.0F); } which works on client but not on server which is weird cause it bases it off the username. Its best to only ask questions when you did most of the work yourself.
January 23, 201510 yr Hi The fact that it works client side makes me think that this.getUser() is null or is the wrong username on the server side. Have you checked using System.out.println() or a breakpoint? -TGG
January 23, 201510 yr Author Hi The fact that it works client side makes me think that this.getUser() is null or is the wrong username on the server side. Have you checked using System.out.println() or a breakpoint? -TGG You know I cant believe I didn't add a check to make sure that getUser didn't equal null I am sorry for you're trouble thank you Its best to only ask questions when you did most of the work yourself.
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.