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

What exactly do you want to "log"?

 

Do you want to store who entered in a server in a given time (lets say for a block that does X thing) or simply catch the event so that you can do something based on a player's entry in the game?

 

In both you should look at forge events and event handling, these link should help you

 

http://jabelarminecraft.blogspot.ca/p/minecraft-forge-172-event-handling.html

http://bedrockminer.jimdo.com/modding-tutorials/advanced-modding/event-handler/

http://minecraftforgetutorials.weebly.com/event-introduction.html

 

And the best tutorial imo: http://greyminecraftcoder.blogspot.ca/2013/12/forge-techniques-events.html

When they say your code doesn't follow convention but ur edgy so u dont care

d-d-d-dab on them haterz

 

  • Author

I want to log and save a list: players joined the server

 

inside log file:

MC username, and time they joined, and how many have joined

I want to log and save a list: players joined the server

 

inside log file:

MC username, and time they joined, and how many have joined

Note that PlayerLoggedInEvent has the joined player as public field.

1. MC username: player.getDisplayName()

2. Time they joined: I'd assume that you know how to get system time.

To get minecraft time, use World#getWorldTime(). (Player has public field named worldObj)

Get the Overworld using MinecraftServer#getEntityWorld() to get universal server time.

3. How many players have joined:

  - length of World#playerEntities for players in the world.

  - MinecraftServer#getCurrentPlayerCount() for all players in the server.

 

And what do you mean (EDIT) by saving the list?

I. Stellarium for Minecraft: Configurable Universe for Minecraft! (WIP)

II. Stellar Sky, Better Star Rendering&Sky Utility mod, had separated from Stellarium.

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.