SpongeAPI: setBlock for players and FakePlayers?
Shouldn’t we have a these methods in BlockVolume?
/* Returns true if the block has been set */
boolean setBlock(Vector3i position, BlockState block, Player player);
boolean setBlock(Vector3i position, BlockState block, String fakePlayer /* Or PluginName */);
/* For Bulk Actions, Both arrays should have the same size */
boolean setBlock(Vector3i[] position, BlockState[] block, Player player);
boolean setBlock(Vector3i[] position, BlockState[] block, String fakePlayer);
These methods would than give of an event, so other plugins can deny the placement. With this plugins easily could modify blocks, without having to worry if other plugins agree with it.
About this issue
- Original URL
- State: closed
- Created 9 years ago
- Comments: 20 (17 by maintainers)
That’s because the API is not implemented in the current builds. See https://github.com/SpongePowered/SpongeCommon/pull/86