Class PlayerEvent.LoadFromFile
- java.lang.Object
-
- net.minecraftforge.eventbus.api.Event
-
- net.minecraftforge.event.entity.EntityEvent
-
- net.minecraftforge.event.entity.living.LivingEvent
-
- net.minecraftforge.event.entity.player.PlayerEvent
-
- net.minecraftforge.event.entity.player.PlayerEvent.LoadFromFile
-
- Enclosing class:
- PlayerEvent
public static class PlayerEvent.LoadFromFile extends PlayerEvent
The player is being loaded from the world save. Note that the player won't have been added to the world yet. Intended to allow mods to load an additional file from the players directory containing additional mod related player data.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class net.minecraftforge.event.entity.player.PlayerEvent
PlayerEvent.BreakSpeed, PlayerEvent.Clone, PlayerEvent.HarvestCheck, PlayerEvent.ItemCraftedEvent, PlayerEvent.ItemPickupEvent, PlayerEvent.ItemSmeltedEvent, PlayerEvent.LoadFromFile, PlayerEvent.NameFormat, PlayerEvent.PlayerChangedDimensionEvent, PlayerEvent.PlayerChangeGameModeEvent, PlayerEvent.PlayerLoggedInEvent, PlayerEvent.PlayerLoggedOutEvent, PlayerEvent.PlayerRespawnEvent, PlayerEvent.SaveToFile, PlayerEvent.StartTracking, PlayerEvent.StopTracking, PlayerEvent.TabListNameFormat, PlayerEvent.Visibility
-
Nested classes/interfaces inherited from class net.minecraftforge.event.entity.living.LivingEvent
LivingEvent.LivingJumpEvent, LivingEvent.LivingUpdateEvent, LivingEvent.LivingVisibilityEvent
-
Nested classes/interfaces inherited from class net.minecraftforge.event.entity.EntityEvent
EntityEvent.CanUpdate, EntityEvent.EnteringChunk, EntityEvent.EntityConstructing, EntityEvent.Size
-
-
Field Summary
Fields Modifier and Type Field Description private java.io.File
playerDirectory
private java.lang.String
playerUUID
-
Constructor Summary
Constructors Constructor Description LoadFromFile(PlayerEntity player, java.io.File originDirectory, java.lang.String playerUUID)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.io.File
getPlayerDirectory()
The directory where player data is being stored.java.io.File
getPlayerFile(java.lang.String suffix)
Construct and return a recommended file for the supplied suffixjava.lang.String
getPlayerUUID()
The UUID is the standard for player related file storage.-
Methods inherited from class net.minecraftforge.event.entity.player.PlayerEvent
getPlayer
-
Methods inherited from class net.minecraftforge.event.entity.living.LivingEvent
getEntityLiving
-
Methods inherited from class net.minecraftforge.event.entity.EntityEvent
getEntity
-
-
-
-
Constructor Detail
-
LoadFromFile
public LoadFromFile(PlayerEntity player, java.io.File originDirectory, java.lang.String playerUUID)
-
-
Method Detail
-
getPlayerFile
public java.io.File getPlayerFile(java.lang.String suffix)
Construct and return a recommended file for the supplied suffix- Parameters:
suffix
- The suffix to use.- Returns:
-
getPlayerDirectory
public java.io.File getPlayerDirectory()
The directory where player data is being stored. Use this to locate your mod additional file.
-
getPlayerUUID
public java.lang.String getPlayerUUID()
The UUID is the standard for player related file storage. It is broken out here for convenience for quick file generation.
-
-