Skip to content

Commit

Permalink
Version 1.0.1: Fix exception in ender crystal drop suppression check.
Browse files Browse the repository at this point in the history
  • Loading branch information
totemo committed Jun 16, 2016
1 parent 0ebfda6 commit e0d48e0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 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>SafeCrystals</name>
<artifactId>${project.name}</artifactId>
<version>1.0.0</version>
<version>1.0.1</version>
<packaging>jar</packaging>
<description>Prevent Ender Crystals from exploding and breaking blocks or damaging entities.</description>
<url>https://github.com/totemo/${project.name}</url>
Expand Down
3 changes: 2 additions & 1 deletion src/nu/nerd/safecrystals/SafeCrystals.java
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,8 @@ protected void tryBreakEnderCrystal(Entity crystal, Player player) {
* the dragon.
*/
protected boolean isDragonSpawningCrystal(Location loc) {
return (loc.distance(CONFIG.END_PORTAL_LOCATION) < CONFIG.END_PORTAL_RADIUS);
return loc.getWorld().equals(CONFIG.END_PORTAL_LOCATION.getWorld()) &&
loc.distance(CONFIG.END_PORTAL_LOCATION) < CONFIG.END_PORTAL_RADIUS;
}

// ------------------------------------------------------------------------
Expand Down

0 comments on commit e0d48e0

Please sign in to comment.