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
2013-04-14 13:18:37 [SEVERE] net.minecraft.server.v1_5_R2.ReportedException: Ticking entity | |
2013-04-14 13:18:37 [SEVERE] at net.minecraft.server.v1_5_R2.MinecraftServer.r(MinecraftServer.java:565) | |
2013-04-14 13:18:37 [SEVERE] at net.minecraft.server.v1_5_R2.DedicatedServer.r(DedicatedServer.java:229) | |
2013-04-14 13:18:37 [SEVERE] at net.minecraft.server.v1_5_R2.MinecraftServer.q(MinecraftServer.java:471) | |
2013-04-14 13:18:37 [SEVERE] at net.minecraft.server.v1_5_R2.MinecraftServer.run(MinecraftServer.java:403) | |
2013-04-14 13:18:37 [SEVERE] at net.minecraft.server.v1_5_R2.ThreadServerApplication.run(SourceFile:573) | |
2013-04-14 13:18:37 [SEVERE] Caused by: java.lang.NullPointerException | |
2013-04-14 13:18:37 [SEVERE] at net.minecraft.server.v1_5_R2.Entity.teleportTo(Entity.java:1781) | |
2013-04-14 13:18:37 [SEVERE] at net.minecraft.server.v1_5_R2.Entity.c(Entity.java:1774) | |
2013-04-14 13:18:37 [SEVERE] at net.minecraft.server.v1_5_R2.BlockEnderPortal.a(BlockEnderPortal.java:47) |
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
package fr.ribesg.bukkit.nenchantingegg.altar; | |
/** | |
* Represents the state of an Altar. | |
* An Altar can only go to the "Next step", maybe this would need some | |
* emergency thing, for example if the Player disconnect. | |
* | |
* @author Ribesg | |
*/ | |
public enum AltarState { |
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
public static void main(String[] args) | |
{ | |
try (BufferedReader reader = new BufferedReader( | |
new InputStreamReader( | |
new URL("http://www.yoursimpledate.server/").openStream()))) | |
{ | |
String line = reader.readLine(); | |
SimpleDateFormat format = new SimpleDateFormat("MM/DD/YY"); | |
Date date = format.parse(line); | |
} catch (ParseException | IOException exception) { |
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
# The time between checks for respawning EnderDragons, in seconds. Default: 0 (Disabled) | |
# Here are some values: | |
# 0: Disabled | |
# 1 800: 30 minutes | |
# 3 600: 1 hour | |
# 7 200: 2 hours | |
# 10 800: 3 hours | |
# 14 400: 4 hours | |
# 21 600: 6 hours | |
# 28 800: 8 hours |
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
# Should we regen the End world before respawning Dragons ? Default: 1 | |
# 0: Disabled. | |
# 1: Enabled. World will be regen, even if EnderDragons are still alive. | |
regenOnRespawn: 1 |
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
private boolean isValid(String directoryName) { | |
try { | |
Path worldContainer = Bukkit.getWorldContainer().toPath(); | |
Path path = worldContainer.resolve(directoryName); | |
File file = path.toFile(); | |
if (file.exists()) { | |
return true; | |
} | |
else if (file.createNewFile()) { | |
file.delete(); |
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
public class SpawnDragonTask extends BukkitRunnable { | |
private final EndWorldHandler handler; | |
private final Location loc; | |
private boolean hasBeenSpawned; | |
public SpawnDragonTask(final EndWorldHandler handler, final Location loc) { | |
this.handler = handler; | |
this.loc = loc; | |
hasBeenSpawned = false; | |
Bukkit.getScheduler().runTaskTimer(handler.getPlugin(), this, 1L, 1L); |
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
############################################################################# | |
## Config file for NTheEndAgain plugin. If you don't understand something, ## | |
## please ask on dev.bukkit.org or on forum post. Ribesg ## | |
############################################################################# | |
# This config file is about the world "world_the_end" | |
########################### | |
## GENERAL 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
################################################################################### | |
# List of NTheEndAgain messages. You're free to change text/colors/language here. # | |
# Supports both '§' and '&' characters for colors. Ribesg # | |
################################################################################### | |
# Default value : &cYou do not have the permission to use that command | |
# Awaited arguments: none | |
noPermissionForCommand: "&cYou do not have the permission to use that command" | |
# Default value : &cThis command is only available in game |
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
@EventHandler(priority = EventPriority.NORMAL, ignoreCancelled = true) | |
public void onPlayerPlaceBlock(final BlockPlaceEvent event) { | |
final Block block = event.getBlockPlaced(); | |
final Material mat = block.getType(); | |
final Location loc = block.getLocation(); | |
Altar altar; | |
switch (mat) { | |
case DRAGON_EGG: // Placing a Dragon Egg on the center of an activated Altar | |
final ChunkCoord coord = new ChunkCoord(event.getBlockPlaced().getLocation().getChunk()); | |
altar = plugin.getAltarMap().get(coord); |