-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Suppress ender crystal drops in a radius around the end portal (end s…
…ide) to prevent their recovery when the dragon has already started spawning.
- Loading branch information
Showing
4 changed files
with
87 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
end-portal: | ||
radius: 7.0 | ||
location: | ||
==: org.bukkit.Location | ||
world: world_the_end | ||
x: 0.0 | ||
y: 62.0 | ||
z: 0.0 | ||
pitch: 0.0 | ||
yaw: 0.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
package nu.nerd.safecrystals; | ||
|
||
import org.bukkit.Location; | ||
|
||
// ---------------------------------------------------------------------------- | ||
/** | ||
* Configuration wrapper. | ||
*/ | ||
public class Configuration { | ||
/** | ||
* Radius around END_PORTAL_LOCATION where broken ender crystals don't drop. | ||
*/ | ||
public double END_PORTAL_RADIUS; | ||
|
||
/** | ||
* Location of the (assumed only) end-side end portal. | ||
*/ | ||
public Location END_PORTAL_LOCATION; | ||
|
||
// ------------------------------------------------------------------------ | ||
/** | ||
* Reload the configuration. | ||
*/ | ||
public void reload() { | ||
SafeCrystals.PLUGIN.reloadConfig(); | ||
|
||
END_PORTAL_RADIUS = SafeCrystals.PLUGIN.getConfig().getDouble("end-portal.radius"); | ||
END_PORTAL_LOCATION = (Location) SafeCrystals.PLUGIN.getConfig().get("end-portal.location"); | ||
} | ||
} // class Configuration |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters