Fix bat spawning and POM updates (#121)

* Fix bat spawning and POM updates

- Update POM for latest versions available
- Fix bats and giants bypassing spawn rules
- Update usages for /invis from /invis (clear) to /invis [clear]
- Add /mob as an alias to /spawnmob
- Remove redundant variables from POM
This commit is contained in:
Model 3 2018-10-06 11:44:58 -07:00 committed by Seth
parent 322ed77232
commit 7a43f991e3
6 changed files with 44 additions and 73 deletions

View File

@ -10,10 +10,8 @@
</content> </content>
<orderEntry type="inheritedJdk" /> <orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" /> <orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="Maven: org.bstats:bstats-bukkit:1.2" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: org.bukkit:bukkit:1.9.4-R0.1-SNAPSHOT" level="project" /> <orderEntry type="library" scope="PROVIDED" name="Maven: org.bukkit:bukkit:1.9.4-R0.1-SNAPSHOT" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: org.avaje:ebean:2.8.1" level="project" /> <orderEntry type="library" scope="PROVIDED" name="Maven: org.avaje:ebean:2.8.1" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: com.sk89q.worldguard:worldguard-legacy:6.2" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: org.projectlombok:lombok:1.18.0" level="project" /> <orderEntry type="library" scope="PROVIDED" name="Maven: org.projectlombok:lombok:1.18.0" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: org.spigotmc:spigot:1.13.1-R0.1-SNAPSHOT" level="project" /> <orderEntry type="library" scope="PROVIDED" name="Maven: org.spigotmc:spigot:1.13.1-R0.1-SNAPSHOT" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: com.github.Pravian:Aero:5f82926" level="project" /> <orderEntry type="library" scope="PROVIDED" name="Maven: com.github.Pravian:Aero:5f82926" level="project" />
@ -46,32 +44,26 @@
<orderEntry type="library" scope="PROVIDED" name="Maven: org.sk89q.bukkit:bukkit-classloader-check:1.7.9-R0.2" level="project" /> <orderEntry type="library" scope="PROVIDED" name="Maven: org.sk89q.bukkit:bukkit-classloader-check:1.7.9-R0.2" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: org.avaje:ebean:2.7.3" level="project" /> <orderEntry type="library" scope="PROVIDED" name="Maven: org.avaje:ebean:2.7.3" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: javax.persistence:persistence-api:1.0" level="project" /> <orderEntry type="library" scope="PROVIDED" name="Maven: javax.persistence:persistence-api:1.0" level="project" />
<orderEntry type="module-library">
<library name="Maven: com.sk89q.worldedit:worldedit-bukkit:7.0.0-SNAPSHOT">
<CLASSES>
<root url="jar://$MODULE_DIR$/lib/WorldEdit.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="library" scope="PROVIDED" name="Maven: net.ess3:Essentials:2.13.1" level="project" /> <orderEntry type="library" scope="PROVIDED" name="Maven: net.ess3:Essentials:2.13.1" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: org.bukkit:craftbukkit:1.13-R0.1-SNAPSHOT" level="project" /> <orderEntry type="library" scope="PROVIDED" name="Maven: org.bukkit:craftbukkit:1.13.1-R0.1-SNAPSHOT" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: net.dv8tion:JDA:3.7.1_385" level="project" /> <orderEntry type="library" scope="PROVIDED" name="Maven: net.dv8tion:JDA:3.8.0_423" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: com.google.code.findbugs:jsr305:3.0.2" level="project" /> <orderEntry type="library" scope="PROVIDED" name="Maven: com.google.code.findbugs:jsr305:3.0.2" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: org.jetbrains:annotations:16.0.1" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: org.slf4j:slf4j-api:1.7.25" level="project" /> <orderEntry type="library" scope="PROVIDED" name="Maven: org.slf4j:slf4j-api:1.7.25" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: com.neovisionaries:nv-websocket-client:2.5" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: com.squareup.okhttp3:okhttp:3.8.1" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: com.squareup.okio:okio:1.13.0" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: club.minnced:opus-java-api:1.0.4" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: net.java.dev.jna:jna:4.4.0" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: club.minnced:opus-java-natives:1.0.4" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: org.apache.commons:commons-collections4:4.1" level="project" /> <orderEntry type="library" scope="PROVIDED" name="Maven: org.apache.commons:commons-collections4:4.1" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: org.json:json:20160810" level="project" /> <orderEntry type="library" scope="PROVIDED" name="Maven: org.json:json:20160810" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: net.sf.trove4j:trove4j:3.0.3" level="project" /> <orderEntry type="library" scope="PROVIDED" name="Maven: net.sf.trove4j:trove4j:3.0.3" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: club.minnced:opus-java:1.0.2" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: club.minnced:opus-java-api:1.0.2" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: net.java.dev.jna:jna:4.4.0" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: club.minnced:opus-java-natives:1.0.2" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: com.neovisionaries:nv-websocket-client:2.4" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: com.squareup.okhttp3:okhttp:3.8.1" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: com.squareup.okio:okio:1.13.0" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: net.coreprotect:coreprotect:2.15.0" level="project" /> <orderEntry type="library" scope="PROVIDED" name="Maven: net.coreprotect:coreprotect:2.15.0" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: org.bukkit:bukkit:1.13-R0.1-SNAPSHOT" level="project" /> <orderEntry type="library" scope="PROVIDED" name="Maven: org.bukkit:bukkit:1.13-R0.1-SNAPSHOT" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: com.sk89q.worldedit:worldedit-bukkit:7.0.0-SNAPSHOT" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: com.sk89q.worldedit:worldedit-core:7.0.0-SNAPSHOT" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: org.bstats:bstats-bukkit:1.2" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: com.sk89q.worldguard:worldguard-legacy:6.2" level="project" /> <orderEntry type="library" scope="PROVIDED" name="Maven: com.sk89q.worldguard:worldguard-legacy:6.2" level="project" />
</component> </component>
</module> </module>

Binary file not shown.

29
pom.xml
View File

@ -10,12 +10,7 @@
<properties> <properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<tfm.build.version>${project.version}</tfm.build.version>
<tfm.build.codename>God</tfm.build.codename> <tfm.build.codename>God</tfm.build.codename>
<tfm.build.number>${maven.buildnumber}</tfm.build.number>
<tfm.build.date>${maven.build.timestamp}</tfm.build.date>
<tfm.build.author>${buildAuthor}</tfm.build.author>
<tfm.build.head>${git.commit.id.abbrev}</tfm.build.head>
<jar.finalName>${project.name}</jar.finalName> <jar.finalName>${project.name}</jar.finalName>
<timestamp>${maven.build.timestamp}</timestamp> <timestamp>${maven.build.timestamp}</timestamp>
<maven.build.timestamp.format>MM/dd/yyyy HH:mm</maven.build.timestamp.format> <maven.build.timestamp.format>MM/dd/yyyy HH:mm</maven.build.timestamp.format>
@ -139,24 +134,6 @@
<scope>provided</scope> <scope>provided</scope>
</dependency> </dependency>
<dependency>
<groupId>com.github.TFPatches</groupId>
<artifactId>TF-WorldEdit</artifactId>
<version>2e79570525</version>
<scope>provided</scope>
</dependency>
<!-- Temporarily here due to CoreProtect needing the official worldedit, and because it's
not on the official maven repo, it needs to be in a lib folder for now. Will be removed
once 7.0.0 is on the sk89q repo. -->
<dependency>
<groupId>com.sk89q.worldedit</groupId>
<artifactId>worldedit-bukkit</artifactId>
<version>7.0.0-SNAPSHOT</version>
<scope>system</scope>
<systemPath>${project.basedir}/lib/WorldEdit.jar</systemPath>
</dependency>
<dependency> <dependency>
<groupId>net.ess3</groupId> <groupId>net.ess3</groupId>
<artifactId>Essentials</artifactId> <artifactId>Essentials</artifactId>
@ -167,14 +144,14 @@
<dependency> <dependency>
<groupId>org.bukkit</groupId> <groupId>org.bukkit</groupId>
<artifactId>craftbukkit</artifactId> <artifactId>craftbukkit</artifactId>
<version>1.13-R0.1-SNAPSHOT</version> <version>1.13.1-R0.1-SNAPSHOT</version>
<scope>provided</scope> <scope>provided</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>net.dv8tion</groupId> <groupId>net.dv8tion</groupId>
<artifactId>JDA</artifactId> <artifactId>JDA</artifactId>
<version>3.7.1_385</version> <version>3.8.0_423</version>
<scope>provided</scope> <scope>provided</scope>
</dependency> </dependency>
@ -220,7 +197,7 @@
<plugin> <plugin>
<groupId>pl.project13.maven</groupId> <groupId>pl.project13.maven</groupId>
<artifactId>git-commit-id-plugin</artifactId> <artifactId>git-commit-id-plugin</artifactId>
<version>2.2.4</version> <version>2.2.5</version>
<executions> <executions>
<execution> <execution>
<id>get-the-git-infos</id> <id>get-the-git-infos</id>

View File

@ -3,6 +3,7 @@ package me.totalfreedom.totalfreedommod.blocking;
import me.totalfreedom.totalfreedommod.FreedomService; import me.totalfreedom.totalfreedommod.FreedomService;
import me.totalfreedom.totalfreedommod.TotalFreedomMod; import me.totalfreedom.totalfreedommod.TotalFreedomMod;
import me.totalfreedom.totalfreedommod.config.ConfigEntry; import me.totalfreedom.totalfreedommod.config.ConfigEntry;
import me.totalfreedom.totalfreedommod.util.FLog;
import org.bukkit.attribute.Attributable; import org.bukkit.attribute.Attributable;
import org.bukkit.attribute.Attribute; import org.bukkit.attribute.Attribute;
import org.bukkit.entity.Bat; import org.bukkit.entity.Bat;
@ -69,6 +70,7 @@ public class MobBlocker extends FreedomService
} }
final Entity spawned = event.getEntity(); final Entity spawned = event.getEntity();
if (spawned instanceof EnderDragon) if (spawned instanceof EnderDragon)
{ {
if (ConfigEntry.MOB_LIMITER_DISABLE_DRAGON.getBoolean()) if (ConfigEntry.MOB_LIMITER_DISABLE_DRAGON.getBoolean())
@ -100,40 +102,40 @@ public class MobBlocker extends FreedomService
event.setCancelled(true); event.setCancelled(true);
return; return;
} }
else if (spawned instanceof Giant) }
{ else if (spawned instanceof Giant)
if (ConfigEntry.MOB_LIMITER_DISABLE_GIANT.getBoolean()) {
{ if (ConfigEntry.MOB_LIMITER_DISABLE_GIANT.getBoolean())
event.setCancelled(true);
return;
}
}
else if (spawned instanceof Bat)
{ {
event.setCancelled(true); event.setCancelled(true);
return; return;
} }
}
else if (spawned instanceof Bat)
{
event.setCancelled(true);
return;
}
int mobLimiterMax = ConfigEntry.MOB_LIMITER_MAX.getInteger(); int mobLimiterMax = ConfigEntry.MOB_LIMITER_MAX.getInteger();
if (mobLimiterMax <= 0) if (mobLimiterMax <= 0)
{
return;
}
int mobcount = 0;
for (Entity entity : event.getLocation().getWorld().getLivingEntities())
{
if (!(entity instanceof HumanEntity))
{ {
return; mobcount++;
} }
}
int mobcount = 0; if (mobcount > mobLimiterMax)
for (Entity entity : event.getLocation().getWorld().getLivingEntities()) {
{ event.setCancelled(true);
if (!(entity instanceof HumanEntity))
{
mobcount++;
}
}
if (mobcount > mobLimiterMax)
{
event.setCancelled(true);
}
} }
} }
} }

View File

@ -11,7 +11,7 @@ import org.bukkit.entity.Player;
import org.bukkit.potion.PotionEffectType; import org.bukkit.potion.PotionEffectType;
@CommandPermissions(level = Rank.SUPER_ADMIN, source = SourceType.BOTH) @CommandPermissions(level = Rank.SUPER_ADMIN, source = SourceType.BOTH)
@CommandParameters(description = "Shows (optionally clears) invisible players", usage = "/<command> (clear)") @CommandParameters(description = "Shows (optionally clears) invisible players", usage = "/<command> [clear]")
public class Command_invis extends FreedomCommand public class Command_invis extends FreedomCommand
{ {
@Override @Override

View File

@ -1,6 +1,6 @@
name: TotalFreedomMod name: TotalFreedomMod
main: me.totalfreedom.totalfreedommod.TotalFreedomMod main: me.totalfreedom.totalfreedommod.TotalFreedomMod
version: ${tfm.build.version} version: ${project.version}
description: Plugin for the Total Freedom server. description: Plugin for the Total Freedom server.
depend: [Aero] depend: [Aero]
softdepend: [BukkitTelnet, Essentials, LibsDisguises, WorldEdit] softdepend: [BukkitTelnet, Essentials, LibsDisguises, WorldEdit]