Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

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.

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

 

 

 

  • 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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.