mirror of
https://github.com/DRE2N/DungeonsXL.git
synced 2024-11-24 19:45:43 +01:00
Fix Caliburn integration initialization
This commit is contained in:
parent
a50b0e279c
commit
83b92e9a13
14
README.md
14
README.md
@ -46,9 +46,10 @@ If you want to learn how to use DungeonsXL step by step, please have a look at t
|
|||||||
|
|
||||||
## Compatibility
|
## Compatibility
|
||||||
### Server
|
### Server
|
||||||
DungeonsXL works with 1.7.8 and higher. However, support for 1.9.x has a higher priority than support for 1.8.x and lower.
|
DungeonsXL works with 1.7.8 and higher. However, support for 1.10.x / 1.9.x has a higher priority than support for 1.8.x and lower. Some cosmetic features require the Spigot API and will therefore not work with CraftBukkit.
|
||||||
|
|
||||||
Older versions of DungeonsXL support versions since Minecraft 1.3.x, but of course, they are completely unsupported.
|
Older versions of DungeonsXL support versions since Minecraft 1.3.x, but of course, they are completely unsupported.
|
||||||
* [1.7.8-1.9.4](../../tree/master)
|
* [1.7.8-1.10](../../tree/master)
|
||||||
* [1.7.5](../../tree/50f772d14281bfe278dba2559d1758cc459c1a30)
|
* [1.7.5](../../tree/50f772d14281bfe278dba2559d1758cc459c1a30)
|
||||||
* [1.7.2](../../tree/eccf82b7335dfb0723e3cd37a57df1a968ea7842)
|
* [1.7.2](../../tree/eccf82b7335dfb0723e3cd37a57df1a968ea7842)
|
||||||
* [1.6.4](../../tree/780145cf783ea76fe1bfee04cf89216bd4f92e1d)
|
* [1.6.4](../../tree/780145cf783ea76fe1bfee04cf89216bd4f92e1d)
|
||||||
@ -65,12 +66,13 @@ Building DungeonsXL from source requires [Apache Maven](https://maven.apache.org
|
|||||||
Maven automatically fetches all dependencies and builds DungeonsXL; just run _build.bat_ or enter the command _mvn clean install_.
|
Maven automatically fetches all dependencies and builds DungeonsXL; just run _build.bat_ or enter the command _mvn clean install_.
|
||||||
|
|
||||||
#### BRCommons
|
#### BRCommons
|
||||||
Instead of referencing the internals of the implementation directly, DungeonsXL uses [BRCommons](https://github.com/DRE2N/BRCommons).
|
[BRCommons](https://github.com/DRE2N/BRCommons) is a util library for common tasks. DungeonsXL contains BRCommons 1.0.
|
||||||
The shaded version of DXL (standard version) contains this library, while the original version needs it as an external plugin.
|
|
||||||
Have a look at the [installation instructions](../../wiki/getting-started#installation) for detailed information.
|
#### Caliburn API
|
||||||
|
[Caliburn](https://github.com/DRE2N/CaliburnAPI) is an API to read custom items and mobs from config files. DungeonsXL contains Caliburn Beta 0.1.5.
|
||||||
|
|
||||||
### Java
|
### Java
|
||||||
7 and higher
|
Make sure that your server uses Java 7 or higher.
|
||||||
|
|
||||||
### UUIDs
|
### UUIDs
|
||||||
Supported.
|
Supported.
|
||||||
|
@ -17,6 +17,10 @@
|
|||||||
package io.github.dre2n.dungeonsxl;
|
package io.github.dre2n.dungeonsxl;
|
||||||
|
|
||||||
import io.github.dre2n.caliburn.CaliburnAPI;
|
import io.github.dre2n.caliburn.CaliburnAPI;
|
||||||
|
import io.github.dre2n.caliburn.item.ItemCategories;
|
||||||
|
import io.github.dre2n.caliburn.item.Items;
|
||||||
|
import io.github.dre2n.caliburn.mob.MobCategories;
|
||||||
|
import io.github.dre2n.caliburn.mob.Mobs;
|
||||||
import io.github.dre2n.commons.command.BRCommands;
|
import io.github.dre2n.commons.command.BRCommands;
|
||||||
import io.github.dre2n.commons.compatibility.Internals;
|
import io.github.dre2n.commons.compatibility.Internals;
|
||||||
import io.github.dre2n.commons.config.MessageConfig;
|
import io.github.dre2n.commons.config.MessageConfig;
|
||||||
@ -58,6 +62,8 @@ import io.github.dre2n.itemsxl.ItemsXL;
|
|||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.concurrent.CopyOnWriteArrayList;
|
import java.util.concurrent.CopyOnWriteArrayList;
|
||||||
|
import org.bukkit.configuration.ConfigurationSection;
|
||||||
|
import org.bukkit.configuration.file.YamlConfiguration;
|
||||||
import org.bukkit.event.HandlerList;
|
import org.bukkit.event.HandlerList;
|
||||||
import org.bukkit.scheduler.BukkitTask;
|
import org.bukkit.scheduler.BukkitTask;
|
||||||
|
|
||||||
@ -322,9 +328,11 @@ public class DungeonsXL extends BRPlugin {
|
|||||||
*/
|
*/
|
||||||
public void loadCaliburnAPI() {
|
public void loadCaliburnAPI() {
|
||||||
if (manager.isPluginEnabled("ItemsXL")) {
|
if (manager.isPluginEnabled("ItemsXL")) {
|
||||||
this.caliburn = ItemsXL.getInstance().getAPI();
|
caliburn = ItemsXL.getInstance().getAPI();
|
||||||
} else {
|
} else {
|
||||||
this.caliburn = new CaliburnAPI(this);
|
caliburn = new CaliburnAPI(this);
|
||||||
|
ConfigurationSection placeholder = new YamlConfiguration();
|
||||||
|
caliburn.setup(new Items(caliburn), new Mobs(caliburn), new ItemCategories(caliburn, placeholder), new MobCategories(caliburn, placeholder));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user