Jump to content
  • Home
  • Files
  • Docs
Topics
  • All Content

  • This Topic
  • This Forum

  • Advanced Search
  • Existing user? Sign In  

    Sign In



    • Not recommended on shared computers


    • Forgot your password?

  • Sign Up
  • All Activity
  • Home
  • Mod Developer Central
  • Modder Support
  • [1.14/1.15] Detect client side when player logs in/out
Currently Supported: 1.16.X (Latest) and 1.15.X (LTS)
Sign in to follow this  
Followers 1
Tupaç

[1.14/1.15] Detect client side when player logs in/out

By Tupaç, April 4, 2020 in Modder Support

  • Reply to this topic
  • Start new topic

Recommended Posts

Tupaç    0

Tupaç

Tupaç    0

  • Tree Puncher
  • Tupaç
  • Members
  • 0
  • 18 posts
Posted April 4, 2020

Hi, is there a way to detect client side when player joins/exits the world?

i was using PlayerEvent.PlayerLoggedInEvent and PlayerEvent.PlayerLoggedOutEvent but this doesn't work on servers.

 

i need to detect when the player exits the world or closes the game to save data on disk.

  • Quote

Share this post


Link to post
Share on other sites

Animefan8888    741

Animefan8888

Animefan8888    741

  • Reality Controller
  • Animefan8888
  • Forge Modder
  • 741
  • 6157 posts
Posted April 4, 2020
7 minutes ago, Tupaç said:

i need to detect when the player exits the world or closes the game to save data on disk.

WorldEvent.Unload seems to be just what you need.

  • Quote

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

Share this post


Link to post
Share on other sites

Tupaç    0

Tupaç

Tupaç    0

  • Tree Puncher
  • Tupaç
  • Members
  • 0
  • 18 posts
Posted April 4, 2020

Yes! that worked. Thank you very much ?

  • Quote

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

    • Insert image from URL
×
  • Desktop
  • Tablet
  • Phone
Sign in to follow this  
Followers 1
Go To Topic Listing



  • Recently Browsing

    No registered users viewing this page.

  • Posts

    • Luis_ST
      [1.16.5] Enchantments can Apply to all Tools

      By Luis_ST · Posted 2 minutes ago

      but eclipse say i have to set the cast
    • diesieben07
      [1.16.5] Enchantments can Apply to all Tools

      By diesieben07 · Posted 6 minutes ago

      Sure. Although you should not need that cast.   Actually. I looked again. No, that does not make sense. Why are you trying to cast the iterator.
    • Luis_ST
      [1.16.5] Enchantments can Apply to all Tools

      By Luis_ST · Posted 7 minutes ago

      than this while (enchantmentIterator.hasNext()) { Enchantment enchantment = (Enchantment) enchantmentIterator; if (!enchantment.isCompatibleWith(enchantmentIterator.next())) { enchantmentIterator.remove(); } }  
    • diesieben07
      [1.16.5] Enchantments can Apply to all Tools

      By diesieben07 · Posted 10 minutes ago

      By calling remove on the iterator you remove the current element from the collection you are iterating.
    • Luis_ST
      [1.16.5] Enchantments can Apply to all Tools

      By Luis_ST · Posted 12 minutes ago

      while (enchantmentIterator.hasNext()) { Enchantment enchantment = (Enchantment) enchantmentIterator.next(); if (!enchantment.isCompatibleWith((Enchantment) enchantmentIterator)) { enchantmentIterator.remove(); } } so is this correct? and how to remove now the level of the enchantment?
  • Topics

    • Luis_ST
      22
      [1.16.5] Enchantments can Apply to all Tools

      By Luis_ST
      Started Yesterday at 07:21 AM

    • Maxi90909
      3
      Forge 1.16.5 - 36.0.9 start up crash

      By Maxi90909
      Started 1 hour ago

    • matthyit
      3
      my 1.16.5 modded game crashes after a while of playing

      By matthyit
      Started 2 hours ago

    • Zockerbua
      1
      I need help

      By Zockerbua
      Started 37 minutes ago

    • domi0908
      6
      fix hitbox red baby mobs version forge

      By domi0908
      Started Tuesday at 03:04 PM

  • Who's Online (See full list)

    • Maxi90909
    • ozi
    • domi0908
    • diesieben07
    • xX_deadbush_Xx
    • Ray99
    • Tavi007
    • Zemelua
    • Luis_ST
    • Stefan2007
    • gaularn@gmail.com
  • All Activity
  • Home
  • Mod Developer Central
  • Modder Support
  • [1.14/1.15] Detect client side when player logs in/out
  • Theme

Copyright © 2019 ForgeDevelopment LLC · Ads by Longitude Ads LLC Powered by Invision Community