-
Notifications
You must be signed in to change notification settings - Fork 8
API
superator2018@gmail.com edited this page Apr 26, 2019
·
12 revisions
Maven dependency
<repository>
<id>SRegionProtector-master</id>
<url>https://raw.github.com/SergeyDertan/SRegionProtector/mvn-repo/</url>
<snapshots>
<enabled>true</enabled>
<updatePolicy>always</updatePolicy>
</snapshots>
</repository>
return region instance or null
api.getChunkManager().getRegion(Vector3 pos, String levelName)
return region instance or null
api.getRegionManager().checkOverlap(Vector3 pos1, Vector3 pos2, String level, String creator, boolean checkSellFlag, Region self) return true if region overlapping
Custom flags not supported see RegionFlags class
Page.addPage(Page page) your page will appear on the main page You need to override:
- getIcon() - return icon item for the main page
- getName() - page name for the item for gettings its instance
- handle(Item clickedItem, Region currentUIRegion, Player player) - handle clicked button, return true if page refresh required
- getItems(Region currentUIRegion, int pageNumber) - create items for the page, see default pages for example; you can add navigators (next page, refresh, prevous page) with Page.addNavigators(Collection youItems); also you need mark items as a ui items by calling Page.prepareItems(Collection youItems, int pageNumber) if you want to make you own default pages you can modify Page.PAGES