mirror of
https://github.com/songoda/FabledSkyBlock.git
synced 2024-11-07 11:10:04 +01:00
Merge branch 'development'
This commit is contained in:
commit
cd96cab2a4
2
pom.xml
2
pom.xml
@ -5,7 +5,7 @@
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>com.songoda</groupId>
|
||||
<artifactId>skyblock</artifactId>
|
||||
<version>2.2.11</version>
|
||||
<version>2.2.12</version>
|
||||
<packaging>jar</packaging>
|
||||
<build>
|
||||
<defaultGoal>clean install</defaultGoal>
|
||||
|
33
skyblock.iml
Normal file
33
skyblock.iml
Normal file
@ -0,0 +1,33 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
|
||||
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8">
|
||||
<output url="file://$MODULE_DIR$/target/classes" />
|
||||
<output-test url="file://$MODULE_DIR$/target/test-classes" />
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/target" />
|
||||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
<orderEntry type="library" scope="PROVIDED" name="Maven: org.spigotmc:spigot:1.15" level="project" />
|
||||
<orderEntry type="library" scope="PROVIDED" name="Maven: com.github.MilkBowl:VaultAPI:1.7" level="project" />
|
||||
<orderEntry type="library" scope="PROVIDED" name="Maven: org.bukkit:bukkit:1.13.1-R0.1-SNAPSHOT" level="project" />
|
||||
<orderEntry type="library" scope="PROVIDED" name="Maven: commons-lang:commons-lang:2.6" level="project" />
|
||||
<orderEntry type="library" scope="PROVIDED" name="Maven: com.googlecode.json-simple:json-simple:1.1.1" level="project" />
|
||||
<orderEntry type="library" scope="PROVIDED" name="Maven: junit:junit:4.10" level="project" />
|
||||
<orderEntry type="library" scope="PROVIDED" name="Maven: org.hamcrest:hamcrest-core:1.1" level="project" />
|
||||
<orderEntry type="library" scope="PROVIDED" name="Maven: com.google.guava:guava:21.0" level="project" />
|
||||
<orderEntry type="library" scope="PROVIDED" name="Maven: com.google.code.gson:gson:2.8.0" level="project" />
|
||||
<orderEntry type="library" scope="PROVIDED" name="Maven: org.yaml:snakeyaml:1.21" level="project" />
|
||||
<orderEntry type="library" scope="PROVIDED" name="Maven: com.github.OmerBenGera:WildStackerAPI:b15" level="project" />
|
||||
<orderEntry type="library" scope="PROVIDED" name="Maven: com.songoda:ultimatestacker:1.3.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: be.maximvdw:MVdWPlaceholderAPI:2.1.1-SNAPSHOT" level="project" />
|
||||
<orderEntry type="library" scope="PROVIDED" name="Maven: me.clip:placeholderapi:2.9.2" level="project" />
|
||||
<orderEntry type="library" scope="PROVIDED" name="Maven: me.robin:LeaderHeadsAPI:1.0" level="project" />
|
||||
<orderEntry type="library" scope="PROVIDED" name="Maven: com.songoda:epicspawners:6-pre4" level="project" />
|
||||
<orderEntry type="library" scope="PROVIDED" name="Maven: com.songoda:EpicAnchors:1.4.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.sk89q:worldedit-bukkit:7.1.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.songoda:SongodaCore:2.3.34" level="project" />
|
||||
</component>
|
||||
</module>
|
BIN
src/.DS_Store
vendored
Normal file
BIN
src/.DS_Store
vendored
Normal file
Binary file not shown.
@ -52,6 +52,13 @@ public class Entity implements Listener {
|
||||
this.skyblock = skyblock;
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void onFireWorkBoom(EntityDamageByEntityEvent event) {
|
||||
if (event.getDamager().getType() == EntityType.FIREWORK
|
||||
&& skyblock.getWorldManager().isIslandWorld(event.getEntity().getWorld()))
|
||||
event.setCancelled(true);
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void onEntityDamage(EntityDamageEvent event) {
|
||||
if (!(event.getEntity() instanceof Player)) {
|
||||
@ -63,23 +70,22 @@ public class Entity implements Listener {
|
||||
FileManager fileManager = skyblock.getFileManager();
|
||||
|
||||
if (skyblock.getWorldManager().isIslandWorld(player.getWorld())) {
|
||||
if (event.getCause() != null) {
|
||||
if (event.getCause() == DamageCause.VOID) {
|
||||
event.getCause();
|
||||
if (event.getCause() == DamageCause.VOID) {
|
||||
return;
|
||||
} else if (event.getCause() == DamageCause.ENTITY_ATTACK) {
|
||||
EntityDamageByEntityEvent entityDamageByEntityEvent = (EntityDamageByEntityEvent) event;
|
||||
|
||||
if (entityDamageByEntityEvent.getDamager() != null && entityDamageByEntityEvent.getDamager() instanceof Player) {
|
||||
return;
|
||||
} else if (event.getCause() == DamageCause.ENTITY_ATTACK) {
|
||||
EntityDamageByEntityEvent entityDamageByEntityEvent = (EntityDamageByEntityEvent) event;
|
||||
}
|
||||
} else {
|
||||
if (NMSUtil.getVersionNumber() > 11) {
|
||||
if (event.getCause() == DamageCause.valueOf("ENTITY_SWEEP_ATTACK")) {
|
||||
EntityDamageByEntityEvent entityDamageByEntityEvent = (EntityDamageByEntityEvent) event;
|
||||
|
||||
if (entityDamageByEntityEvent.getDamager() != null && entityDamageByEntityEvent.getDamager() instanceof Player) {
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
if (NMSUtil.getVersionNumber() > 11) {
|
||||
if (event.getCause() == DamageCause.valueOf("ENTITY_SWEEP_ATTACK")) {
|
||||
EntityDamageByEntityEvent entityDamageByEntityEvent = (EntityDamageByEntityEvent) event;
|
||||
|
||||
if (entityDamageByEntityEvent.getDamager() != null && entityDamageByEntityEvent.getDamager() instanceof Player) {
|
||||
return;
|
||||
}
|
||||
if (entityDamageByEntityEvent.getDamager() != null && entityDamageByEntityEvent.getDamager() instanceof Player) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user