mirror of
https://github.com/NLthijs48/AreaShop.git
synced 2025-02-19 21:32:28 +01:00
Page:
Create an integration
Pages
Advanced regions setup
Basic regions setup
Changelog
Commands and permissions
Common errors
Compiling AreaShop
Create an integration
Frequently Asked Questions
Home
Language support
Limitgroups information and examples
Modules, packages and classes overview
Region blocks save restore
The config system
1
Create an integration
Thijs Wiefferink edited this page 2018-08-11 23:19:01 +02:00
To hook into AreaShop from your own plugin you can add it as a Maven dependency (recommended) or manual dependency.
Add AreaShop as Maven dependency
-
Add my Maven repository:
<repositories> <repository> <id>nlthijs48</id> <url>http://maven.wiefferink.me</url> </repository> </repositories>
-
Add the Maven dependency:
<dependencies> <dependency> <groupId>me.wiefferink</groupId> <artifactId>areashop</artifactId> <version>2.4.0-SNAPSHOT</version> </dependency> </dependencies>
Get all AreaShop regions
- Get a reference to Areashop:
- Use
AreaShop areaShop = AreaShop.getInstance();
- Or use
AreaShop areaShop = (AreaShop)Bukkit.getServer().getPluginManager().getPlugin("AreaShop");
- Using AreaShop as optional dependency? Use the second option, check if
getPlugin()
returns non-null, after that instantiate your classes that use AreaShop.
- Use
- Use
areaShop.getFileManager().getRegions()
(orgetBuys()
orgetRents()
orgetRegion(String name)
) - Call methods on the region to edit anything you need (see the javadocs)
Listen to AreaShop region changes
- Choose an event to listen for, see available types here.
- In the
ask
folder are cancel-able events for renting/buying/etc. - In the
notify
folder are the same events, buy only for notifying a certain action happened.
- In the
- Create a standard Bukkit event handler:
@EventHandler public void sellingRegion(SellingRegionEvent event) { // Handle the event }
Usage and configuration:
- Commands and Permissions
- Basic regions setup
- Advanced regions setup
- Configuration files
- Download (releases)
Advanced features:
- Save/restore region blocks
- Change the language
- Limitgroups (setup how many regions players can rent/buy)
Troubleshooting:
Development:
Connections:
If you have any questions about how to use or modify AreaShop then feel free to message me. You can create a ticket or message me through Spigot or BukkitDev.