Furniture API — methods and examples
Create an inventory item with createItem(); place a registered furniture ID at a Location using place(id, location, yaw, ownerId). The returned instance can be looked up by UUID and removed. Validate target location and permissions before placing.
What methods are available?
List<FurnitureView> all();Optional<FurnitureView> find(String id);Optional<FurnitureView> identify(ItemStack item);Optional<FurnitureInstanceView> identify(Entity entity);Optional<FurnitureInstanceView> placed(UUID instanceId);ItemStack createItem(String id, int amount);FurnitureInstanceView place(String id, Location location, float yaw, UUID ownerId);boolean remove(UUID instanceId);
These signatures are read directly from the public ObsidrelAPI 1.0 service interface. An Optional result can be empty, boolean results can indicate failure and views are public read-only projections rather than mutable Core objects.
Practical steps
- Add ObsidrelAPI as a
provided(Maven) orcompileOnly(Gradle) dependency. 2. Check Obsidrel is running and fetchObsidrelProvider.require(1). 3. Call the matching service with an ID that is already loaded. 4. Handle missing values and failures before showing messages to players. 5. Test on a staging server with the exact Core version.
Troubleshooting
If lookup fails, check the resource ID and whether it loaded in Core. If provider lookup fails, confirm the plugin dependency, Core startup and API level. Do not link to private implementation classes; the supported contract is the public me.antzbr.obsidrel.api.* package.
See: API setup · Service catalog.