mirror of
https://github.com/DRE2N/DungeonsXL.git
synced 2024-12-01 06:53:26 +01:00
Fix #62
This commit is contained in:
parent
cac3e3de39
commit
5699cc142b
@ -67,7 +67,7 @@ Instead of referencing the internals of the implementation directly, DungeonsXL
|
|||||||
The shaded version of DXL (standard version) contains this library, while the original version needs it as an external plugin.
|
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.
|
Have a look at the [installation instructions](../../wiki/getting-started#installation) for detailed information.
|
||||||
|
|
||||||
DungeonsXL currently uses BRCommons 0.5.
|
DungeonsXL currently uses BRCommons 0.5.1.
|
||||||
|
|
||||||
### Java
|
### Java
|
||||||
7 and higher
|
7 and higher
|
||||||
|
2
pom.xml
2
pom.xml
@ -2,7 +2,7 @@
|
|||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<groupId>io.github.dre2n</groupId>
|
<groupId>io.github.dre2n</groupId>
|
||||||
<artifactId>dungeonsxl</artifactId>
|
<artifactId>dungeonsxl</artifactId>
|
||||||
<version>0.11-SNAPSHOT</version>
|
<version>0.11</version>
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
<name>DungeonsXL</name>
|
<name>DungeonsXL</name>
|
||||||
<url>https://dre2n.github.io</url>
|
<url>https://dre2n.github.io</url>
|
||||||
|
@ -38,7 +38,6 @@ import org.bukkit.event.EventHandler;
|
|||||||
import org.bukkit.event.EventPriority;
|
import org.bukkit.event.EventPriority;
|
||||||
import org.bukkit.event.Listener;
|
import org.bukkit.event.Listener;
|
||||||
import org.bukkit.event.entity.CreatureSpawnEvent;
|
import org.bukkit.event.entity.CreatureSpawnEvent;
|
||||||
import org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason;
|
|
||||||
import org.bukkit.event.entity.EntityCombustByEntityEvent;
|
import org.bukkit.event.entity.EntityCombustByEntityEvent;
|
||||||
import org.bukkit.event.entity.EntityCombustEvent;
|
import org.bukkit.event.entity.EntityCombustEvent;
|
||||||
import org.bukkit.event.entity.EntityDamageByEntityEvent;
|
import org.bukkit.event.entity.EntityDamageByEntityEvent;
|
||||||
@ -71,9 +70,12 @@ public class EntityListener implements Listener {
|
|||||||
GameWorld gameWorld = GameWorld.getByWorld(world);
|
GameWorld gameWorld = GameWorld.getByWorld(world);
|
||||||
|
|
||||||
if (editWorld != null || gameWorld != null) {
|
if (editWorld != null || gameWorld != null) {
|
||||||
if (event.getSpawnReason() == SpawnReason.CHUNK_GEN || event.getSpawnReason() == SpawnReason.BREEDING || event.getSpawnReason() == SpawnReason.NATURAL
|
switch (event.getSpawnReason()) {
|
||||||
|| event.getSpawnReason() == SpawnReason.DEFAULT) {
|
case CHUNK_GEN:
|
||||||
event.setCancelled(true);
|
case JOCKEY:
|
||||||
|
case MOUNT:
|
||||||
|
case NATURAL:
|
||||||
|
event.setCancelled(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user