You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
for a server that uses your plugin I made a small change to the source code, that I believe would benefit most use cases.
I am adding blocks that generate because of the use of bonemeal to the list of blocks placed by the player. This is helpful if players want to farm on a hotel region.
Because I made my changes inside of a gitlab repo I cant issue a pull request, therefor I will just mention the code changes I made.
In the file "BlockModifyListener" I added following lines:
@EventHandler(priority = EventPriority.HIGHEST)
public void addGeneratedBlock(BlockFertilizeEvent event) {
if (event.isCancelled()) {
return;
}
if (AdvancedRegionMarket.getInstance().getRegionManager() == null) {
return;
}
List<Region> locRegions = AdvancedRegionMarket.getInstance().getRegionManager().getRegionsByLocation(event.getBlock().getLocation());
for (Region region : locRegions) {
if (region.isHotel()) {
if (region.isSold()) {
for (BlockState block : event.getBlocks()){
region.addBuiltBlock(block.getLocation());
}
}
}
}
}
Because I believe this feature would benefit a lot of Players I hope you consider adding it to your code.
Thank you for your amazing work.
Best regards,
Kai
The text was updated successfully, but these errors were encountered:
Hello Alex,
for a server that uses your plugin I made a small change to the source code, that I believe would benefit most use cases.
I am adding blocks that generate because of the use of bonemeal to the list of blocks placed by the player. This is helpful if players want to farm on a hotel region.
Because I made my changes inside of a gitlab repo I cant issue a pull request, therefor I will just mention the code changes I made.
In the file "BlockModifyListener" I added following lines:
Because I believe this feature would benefit a lot of Players I hope you consider adding it to your code.
Thank you for your amazing work.
Best regards,
Kai
The text was updated successfully, but these errors were encountered: