-
Notifications
You must be signed in to change notification settings - Fork 2
Location Wrapping
Julian Weinelt edited this page Jun 13, 2025
·
1 revision
Location wrapping is really useful for data storage, such as map instances for minigames.
CodeLib contains 2 different types of LocationWrappers:
-
LocationWrapper: Full location storage -
LocationWrapperReduced: Location storage without world reference
To convert between Bukkit's Location and the LocationWrappers, you need to use LocUtil.
Examples:
// Convert org.bukkit.Location to LocationWrapper
LocationWrapper wrapper = LocUtil.fromBukkit(location);
// Convert to org.bukkit.Location from LocationWrapper
Location location = LocUtil.fromWrapper(wrapper);