Skip to content

Commit

Permalink
Improve valid entities list - fixes startup issue on 1.12
Browse files Browse the repository at this point in the history
  • Loading branch information
pop4959 committed Jul 28, 2020
1 parent 6733414 commit 1caa833
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
pluginGroup=org.popcraft
pluginVersion=1.0-SNAPSHOT
pluginVersion=1.0.1
4 changes: 1 addition & 3 deletions src/main/java/org/popcraft/stress/test/EntityTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Entity;
import org.bukkit.entity.EntityType;
import org.bukkit.entity.Mob;
import org.bukkit.entity.Player;
import org.bukkit.entity.Projectile;
import org.bukkit.event.EventHandler;
Expand All @@ -24,7 +23,6 @@
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Random;
import java.util.Set;
import java.util.concurrent.CompletableFuture;
Expand All @@ -34,7 +32,7 @@
public class EntityTest extends Test implements Listener {

private final List<String> VALID_ENTITIES = Arrays.stream(EntityType.values())
.filter(e -> Objects.nonNull(e.getEntityClass()) && Mob.class.isAssignableFrom(e.getEntityClass()))
.filter(EntityType::isSpawnable)
.map(EntityType::name)
.map(String::toLowerCase)
.collect(Collectors.toList());
Expand Down

0 comments on commit 1caa833

Please sign in to comment.