Skip to content

Commit

Permalink
Limit objective particles to 16 blocks using deprecated API.
Browse files Browse the repository at this point in the history
  • Loading branch information
totemo committed Aug 4, 2017
1 parent 219b201 commit 208a2f6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<groupId>nu.nerd</groupId>
<name>BeastMaster</name>
<artifactId>${project.name}</artifactId>
<version>1.2.0</version>
<version>1.2.1</version>
<packaging>jar</packaging>
<description>Handles custom mob spawning.</description>
<url>https://github.com/NerdNu/${project.name}</url>
Expand Down
16 changes: 8 additions & 8 deletions src/nu/nerd/beastmaster/objectives/Objective.java
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
package nu.nerd.beastmaster.objectives;

import org.bukkit.Effect;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.Particle;
import org.bukkit.Sound;
import org.bukkit.World;
import org.bukkit.block.Block;
import org.bukkit.entity.Entity;
import org.bukkit.entity.Player;
import org.bukkit.material.MaterialData;

import nu.nerd.beastmaster.BeastMaster;
import nu.nerd.beastmaster.DropSet;
Expand Down Expand Up @@ -85,12 +84,13 @@ public boolean isAlive() {
}
}

MaterialData data = new MaterialData(Material.GLOWSTONE);
_location.getWorld().spawnParticle(Particle.BLOCK_CRACK, _location,
_objectiveType.getParticleCount(),
_objectiveType.getParticleRadius(),
_objectiveType.getParticleRadius(),
_objectiveType.getParticleRadius(), data);
World.Spigot spigot = _location.getWorld().spigot();
spigot.playEffect(_location,
Effect.TILE_BREAK, Material.GLOWSTONE.getId(), 0,
_objectiveType.getParticleRadius(),
_objectiveType.getParticleRadius(),
_objectiveType.getParticleRadius(), 0,
_objectiveType.getParticleCount(), 16);

for (Entity entity : _location.getWorld().getNearbyEntities(_location, 2, 2, 2)) {
if (entity instanceof Player) {
Expand Down

0 comments on commit 208a2f6

Please sign in to comment.