Random Teleport plugin make server crash when in another dimmension

Discussion in 'Plugin Development' started by Neplioz, Jul 6, 2023.

Thread Status:
Not open for further replies.
  1. Offline

    Neplioz

    Hello, in my random teleport plugin, when i execute the command to random teleport in the nether, it make the server crash.

    This is the teleportutils class
    Code:
    package nepliozplugins.randomteleport;import org.bukkit.*;import org.bukkit.block.Block;import org.bukkit.entity.Player;import java.util.HashSet;import java.util.Random;public class TeleportUtils {
    
    static RandomTeleport plugin; public TeleportUtils(RandomTeleport plugin) {
    this.plugin = plugin;}
    
    public static HashSet<Material> bad_blocks = new HashSet<>(); static{
    bad_blocks.add(Material.LAVA);bad_blocks.add(Material.STATIONARY_LAVA);bad_blocks.add(Material.FIRE);bad_blocks.add(Material.WATER);bad_blocks.add(Material.STATIONARY_WATER);}
    
    public static Location generateLocation(Player player){
    Random random = new Random(); int x = 0; int y = 0; int z = 0;World world = player.getWorld(); boolean useWorldBorder = plugin.getConfig().getBoolean("world-border"); if (useWorldBorder) {
    int borderSize = (int) world.getWorldBorder().getSize() / 2;x = random.nextInt(borderSize * 2) - borderSize;z = random.nextInt(borderSize * 2) - borderSize;x += world.getWorldBorder().getCenter().getX();z += world.getWorldBorder().getCenter().getZ();Location testLocation = new Location(world, x, 0, z); if (!world.getWorldBorder().isInside(testLocation)) {
    return generateLocation(player);}
    } else {
    int maxDistance = 25000;x = random.nextInt(maxDistance) - maxDistance / 2;z = random.nextInt(maxDistance) - maxDistance / 2;}
    
    y = 150;Location randomLocation = new Location(world, x, y, z);y = randomLocation.getWorld().getHighestBlockYAt(randomLocation);randomLocation.setY(y); while (!isLocationSafe(randomLocation)) {
    if (useWorldBorder) {
    double borderSize = world.getWorldBorder().getSize() / 2.0;x = random.nextInt((int)borderSize * 2) - (int)borderSize;z = random.nextInt((int)borderSize * 2) - (int)borderSize;} else {
    int maxDistance = 25000;x = random.nextInt(maxDistance) - maxDistance / 2;z = random.nextInt(maxDistance) - maxDistance / 2;}
    
    randomLocation = new Location(world, x, y, z);y = randomLocation.getWorld().getHighestBlockYAt(randomLocation);randomLocation.setY(y);}
    
    return randomLocation;}
    
    public static boolean isLocationSafe(Location location){
    
    int x = location.getBlockX(); int y = location.getBlockY(); int z = location.getBlockZ();Block block = location.getWorld().getBlockAt(x, y ,z);Block below = location.getWorld().getBlockAt(x, y - 1, z);Block above = location.getWorld().getBlockAt(x, y + 1, z); return !(bad_blocks.contains(below.getType()) || (block.getType().isSolid()) || (above.getType().isSolid()));}
    
    }
    Thanks

    I also got the server crash logs
    Code:
    [19:53:06 ERROR]: ------------------------------
    [19:53:06 ERROR]: Server thread dump (Look for plugins here before reporting to Spigot!):
    [19:53:06 ERROR]: ------------------------------
    [19:53:06 ERROR]: Current Thread: Server thread
    [19:53:06 ERROR]:       PID: 22 | Suspended: false | Native: false | State: RUNNABLE
    [19:53:06 ERROR]:       Stack:
    [19:53:06 ERROR]:               [email protected]/java.io.RandomAccessFile.read0(Native Method)
    [19:53:06 ERROR]:               [email protected]/java.io.RandomAccessFile.read(RandomAccessFile.java:364)
    [19:53:06 ERROR]:               [email protected]/java.io.RandomAccessFile.readInt(RandomAccessFile.java:836)
    [19:53:06 ERROR]:               app//net.minecraft.server.v1_12_R1.RegionFile.<init>(RegionFile.java:101)
    [19:53:06 ERROR]:               app//net.minecraft.server.v1_12_R1.RegionFileCache.a(RegionFileCache.java:31)
    [19:53:06 ERROR]:               app//net.minecraft.server.v1_12_R1.RegionFileCache.d(RegionFileCache.java:79)
    [19:53:06 ERROR]:               app//net.minecraft.server.v1_12_R1.ChunkRegionLoader.loadChunk(ChunkRegionLoader.java:62)
    [19:53:06 ERROR]:               app//net.minecraft.server.v1_12_R1.ChunkRegionLoader.a(ChunkRegionLoader.java:43)
    [19:53:06 ERROR]:               app//net.minecraft.server.v1_12_R1.ChunkProviderServer.loadChunk(ChunkProviderServer.java:183)
    [19:53:06 ERROR]:               app//net.minecraft.server.v1_12_R1.ChunkProviderServer.originalGetOrLoadChunkAt(ChunkProviderServer.java:98)
    [19:53:06 ERROR]:               app//net.minecraft.server.v1_12_R1.ChunkProviderServer.originalGetChunkAt(ChunkProviderServer.java:152)
    [19:53:06 ERROR]:               app//net.minecraft.server.v1_12_R1.ChunkProviderServer.getChunkAt(ChunkProviderServer.java:140)
    [19:53:06 ERROR]:               app//net.minecraft.server.v1_12_R1.ChunkProviderServer.getChunkAt(ChunkProviderServer.java:120)
    [19:53:06 ERROR]:               app//net.minecraft.server.v1_12_R1.ChunkProviderServer.getChunkAt(ChunkProviderServer.java:116)
    [19:53:06 ERROR]:               app//org.bukkit.craftbukkit.v1_12_R1.CraftWorld.loadChunk(CraftWorld.java:271)
    [19:53:06 ERROR]:               app//org.bukkit.craftbukkit.v1_12_R1.CraftWorld.loadChunk(CraftWorld.java:162)
    [19:53:06 ERROR]:               app//org.bukkit.craftbukkit.v1_12_R1.CraftWorld.getHighestBlockYAt(CraftWorld.java:104)
    [19:53:06 ERROR]:               app//org.bukkit.craftbukkit.v1_12_R1.CraftWorld.getHighestBlockYAt(CraftWorld.java:576)
    [19:53:06 ERROR]:               nepliozplugins.randomteleport.TeleportUtils.generateLocation(TeleportUtils.java:79)
    [19:53:06 ERROR]:               nepliozplugins.randomteleport.commands.RandomTeleportCommand.onCommand(RandomTeleportCommand.java:36)
    [19:53:06 ERROR]:               app//org.bukkit.command.PluginCommand.execute(PluginCommand.java:44)
    [19:53:06 ERROR]:               app//org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:141)
    [19:53:06 ERROR]:               app//org.bukkit.craftbukkit.v1_12_R1.CraftServer.dispatchCommand(CraftServer.java:648)
    [19:53:06 ERROR]:               app//net.minecraft.server.v1_12_R1.PlayerConnection.handleCommand(PlayerConnection.java:1401)
    [19:53:06 ERROR]:               app//net.minecraft.server.v1_12_R1.PlayerConnection.a(PlayerConnection.java:1236)
    [19:53:06 ERROR]:               app//net.minecraft.server.v1_12_R1.PacketPlayInChat.a(PacketPlayInChat.java:45)
    [19:53:06 ERROR]:               app//net.minecraft.server.v1_12_R1.PacketPlayInChat.a(PacketPlayInChat.java:1)
    [19:53:06 ERROR]:               app//net.minecraft.server.v1_12_R1.PlayerConnectionUtils$1.run(SourceFile:13)
    [19:53:06 ERROR]:               [email protected]/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
    [19:53:06 ERROR]:               [email protected]/java.util.concurrent.FutureTask.run(FutureTask.java:264)
    [19:53:06 ERROR]:               app//net.minecraft.server.v1_12_R1.SystemUtils.a(SourceFile:46)
    [19:53:06 ERROR]:               app//net.minecraft.server.v1_12_R1.MinecraftServer.D(MinecraftServer.java:748)
    [19:53:06 ERROR]:               app//net.minecraft.server.v1_12_R1.DedicatedServer.D(DedicatedServer.java:406)
    [19:53:06 ERROR]:               app//net.minecraft.server.v1_12_R1.MinecraftServer.C(MinecraftServer.java:679)
    [19:53:06 ERROR]:               app//net.minecraft.server.v1_12_R1.MinecraftServer.run(MinecraftServer.java:577)
    [19:53:06 ERROR]:               [email protected]/java.lang.Thread.run(Thread.java:831)
    [19:53:06 ERROR]: ------------------------------
    [19:53:06 ERROR]: Entire Thread Dump:
    [19:53:06 ERROR]: ------------------------------
    [19:53:06 ERROR]: Current Thread: Reference Handler
    [19:53:06 ERROR]:       PID: 2 | Suspended: false | Native: false | State: RUNNABLE
    [19:53:06 ERROR]:       Stack:
    [19:53:06 ERROR]:               [email protected]/java.lang.ref.Reference.waitForReferencePendingList(Native Method)
    [19:53:06 ERROR]:               [email protected]/java.lang.ref.Reference.processPendingReferences(Reference.java:243)
    [19:53:06 ERROR]:               [email protected]/java.lang.ref.Reference$ReferenceHandler.run(Reference.java:215)
    [19:53:06 ERROR]: ------------------------------
    [19:53:06 ERROR]: Current Thread: Finalizer
    [19:53:06 ERROR]:       PID: 3 | Suspended: false | Native: false | State: WAITING
    [19:53:06 ERROR]:       Stack:
    [19:53:06 ERROR]:               [email protected]/java.lang.Object.wait(Native Method)
    [19:53:06 ERROR]:               [email protected]/java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:155)
    [19:53:06 ERROR]:               [email protected]/java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:176)
    [19:53:06 ERROR]:               [email protected]/java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:171)
    [19:53:06 ERROR]: ------------------------------
    [19:53:06 ERROR]: Current Thread: Signal Dispatcher
    [19:53:06 ERROR]:       PID: 4 | Suspended: false | Native: false | State: RUNNABLE
    [19:53:06 ERROR]:       Stack:
    [19:53:06 ERROR]: ------------------------------
    [19:53:06 ERROR]: Current Thread: Attach Listener
    [19:53:06 ERROR]:       PID: 5 | Suspended: false | Native: false | State: RUNNABLE
    [19:53:06 ERROR]:       Stack:
    [19:53:06 ERROR]: ------------------------------
    [19:53:06 ERROR]: Current Thread: Notification Thread
    [19:53:06 ERROR]:       PID: 13 | Suspended: false | Native: false | State: RUNNABLE
    [19:53:06 ERROR]:       Stack:
    [19:53:06 ERROR]: ------------------------------
    [19:53:06 ERROR]: Current Thread: Common-Cleaner
    [19:53:06 ERROR]:       PID: 14 | Suspended: false | Native: false | State: TIMED_WAITING
    [19:53:06 ERROR]:       Stack:
    [19:53:06 ERROR]:               [email protected]/java.lang.Object.wait(Native Method)
    [19:53:06 ERROR]:               [email protected]/java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:155)
    [19:53:06 ERROR]:               [email protected]/jdk.internal.ref.CleanerImpl.run(CleanerImpl.java:140)
    [19:53:06 ERROR]:               [email protected]/java.lang.Thread.run(Thread.java:831)
    [19:53:06 ERROR]:               [email protected]/jdk.internal.misc.InnocuousThread.run(InnocuousThread.java:134)
    [19:53:06 ERROR]: ------------------------------
    [19:53:06 ERROR]: Current Thread: Snooper Timer
    [19:53:06 ERROR]:       PID: 18 | Suspended: false | Native: false | State: TIMED_WAITING
    [19:53:06 ERROR]:       Stack:
    [19:53:06 ERROR]:               [email protected]/java.lang.Object.wait(Native Method)
    [19:53:06 ERROR]:               [email protected]/java.util.TimerThread.mainLoop(Timer.java:553)
    [19:53:06 ERROR]:               [email protected]/java.util.TimerThread.run(Timer.java:506)
    [19:53:06 ERROR]: ------------------------------
    [19:53:06 ERROR]: Current Thread: NonBlockingInputStreamThread
    [19:53:06 ERROR]:       PID: 20 | Suspended: false | Native: false | State: WAITING
    [19:53:06 ERROR]:       Stack:
    [19:53:06 ERROR]:               [email protected]/java.lang.Object.wait(Native Method)
    [19:53:06 ERROR]:               app//org.bukkit.craftbukkit.libs.jline.internal.NonBlockingInputStream.run(NonBlockingInputStream.java:278)
    [19:53:06 ERROR]:               [email protected]/java.lang.Thread.run(Thread.java:831)
    [19:53:06 ERROR]: ------------------------------
    [19:53:06 ERROR]: Current Thread: Server Infinisleeper
    [19:53:06 ERROR]:       PID: 23 | Suspended: false | Native: false | State: TIMED_WAITING
    [19:53:06 ERROR]:       Stack:
    [19:53:06 ERROR]:               [email protected]/java.lang.Thread.sleep(Native Method)
    [19:53:06 ERROR]:               app//net.minecraft.server.v1_12_R1.DedicatedServer$1.run(DedicatedServer.java:60)
    [19:53:06 ERROR]: ------------------------------
    [19:53:06 ERROR]: Current Thread: Server thread
    [19:53:06 ERROR]:       PID: 22 | Suspended: false | Native: false | State: RUNNABLE
    [19:53:06 ERROR]:       Thread is waiting on monitor(s):
    [19:53:06 ERROR]:               Locked on:app//net.minecraft.server.v1_12_R1.RegionFileCache.a(RegionFileCache.java:31)
    [19:53:06 ERROR]:               Locked on:app//net.minecraft.server.v1_12_R1.RegionFileCache.d(RegionFileCache.java:79)
    [19:53:06 ERROR]:       Stack:
    [19:53:06 ERROR]:               [email protected]/java.io.RandomAccessFile.read0(Native Method)
    [19:53:06 ERROR]:               [email protected]/java.io.RandomAccessFile.read(RandomAccessFile.java:364)
    [19:53:06 ERROR]:               [email protected]/java.io.RandomAccessFile.readInt(RandomAccessFile.java:836)
    [19:53:06 ERROR]:               app//net.minecraft.server.v1_12_R1.RegionFile.<init>(RegionFile.java:101)
    [19:53:06 ERROR]:               app//net.minecraft.server.v1_12_R1.RegionFileCache.a(RegionFileCache.java:31)
    [19:53:06 ERROR]:               app//net.minecraft.server.v1_12_R1.RegionFileCache.d(RegionFileCache.java:79)
    [19:53:06 ERROR]:               app//net.minecraft.server.v1_12_R1.ChunkRegionLoader.loadChunk(ChunkRegionLoader.java:62)
    [19:53:06 ERROR]:               app//net.minecraft.server.v1_12_R1.ChunkRegionLoader.a(ChunkRegionLoader.java:43)
    [19:53:06 ERROR]:               app//net.minecraft.server.v1_12_R1.ChunkProviderServer.loadChunk(ChunkProviderServer.java:183)
    [19:53:06 ERROR]:               app//net.minecraft.server.v1_12_R1.ChunkProviderServer.originalGetOrLoadChunkAt(ChunkProviderServer.java:98)
    [19:53:06 ERROR]:               app//net.minecraft.server.v1_12_R1.ChunkProviderServer.originalGetChunkAt(ChunkProviderServer.java:152)
    [19:53:06 ERROR]:               app//net.minecraft.server.v1_12_R1.ChunkProviderServer.getChunkAt(ChunkProviderServer.java:140)
    [19:53:06 ERROR]:               app//net.minecraft.server.v1_12_R1.ChunkProviderServer.getChunkAt(ChunkProviderServer.java:120)
    [19:53:06 ERROR]:               app//net.minecraft.server.v1_12_R1.ChunkProviderServer.getChunkAt(ChunkProviderServer.java:116)
    [19:53:06 ERROR]:               app//org.bukkit.craftbukkit.v1_12_R1.CraftWorld.loadChunk(CraftWorld.java:271)
    [19:53:06 ERROR]:               app//org.bukkit.craftbukkit.v1_12_R1.CraftWorld.loadChunk(CraftWorld.java:162)
    [19:53:06 ERROR]:               app//org.bukkit.craftbukkit.v1_12_R1.CraftWorld.getHighestBlockYAt(CraftWorld.java:104)
    [19:53:06 ERROR]:               app//org.bukkit.craftbukkit.v1_12_R1.CraftWorld.getHighestBlockYAt(CraftWorld.java:576)
    [19:53:06 ERROR]:               nepliozplugins.randomteleport.TeleportUtils.generateLocation(TeleportUtils.java:79)
    [19:53:06 ERROR]:               nepliozplugins.randomteleport.commands.RandomTeleportCommand.onCommand(RandomTeleportCommand.java:36)
    [19:53:06 ERROR]:               app//org.bukkit.command.PluginCommand.execute(PluginCommand.java:44)
    [19:53:06 ERROR]:               app//org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:141)
    [19:53:06 ERROR]:               app//org.bukkit.craftbukkit.v1_12_R1.CraftServer.dispatchCommand(CraftServer.java:648)
    [19:53:06 ERROR]:               app//net.minecraft.server.v1_12_R1.PlayerConnection.handleCommand(PlayerConnection.java:1401)
    [19:53:06 ERROR]:               app//net.minecraft.server.v1_12_R1.PlayerConnection.a(PlayerConnection.java:1236)
    [19:53:06 ERROR]:               app//net.minecraft.server.v1_12_R1.PacketPlayInChat.a(PacketPlayInChat.java:45)
    [19:53:06 ERROR]:               app//net.minecraft.server.v1_12_R1.PacketPlayInChat.a(PacketPlayInChat.java:1)
    [19:53:06 ERROR]:               app//net.minecraft.server.v1_12_R1.PlayerConnectionUtils$1.run(SourceFile:13)
    [19:53:06 ERROR]:               [email protected]/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
    [19:53:06 ERROR]:               [email protected]/java.util.concurrent.FutureTask.run(FutureTask.java:264)
    [19:53:06 ERROR]:               app//net.minecraft.server.v1_12_R1.SystemUtils.a(SourceFile:46)
    [19:53:06 ERROR]:               app//net.minecraft.server.v1_12_R1.MinecraftServer.D(MinecraftServer.java:748)
    [19:53:06 ERROR]:               app//net.minecraft.server.v1_12_R1.DedicatedServer.D(DedicatedServer.java:406)
    [19:53:06 ERROR]:               app//net.minecraft.server.v1_12_R1.MinecraftServer.C(MinecraftServer.java:679)
    [19:53:06 ERROR]:               app//net.minecraft.server.v1_12_R1.MinecraftServer.run(MinecraftServer.java:577)
    [19:53:06 ERROR]:               [email protected]/java.lang.Thread.run(Thread.java:831)
    [19:53:06 ERROR]: ------------------------------
    [19:53:06 ERROR]: Current Thread: DestroyJavaVM
    [19:53:06 ERROR]:       PID: 25 | Suspended: false | Native: false | State: RUNNABLE
    [19:53:06 ERROR]:       Stack:
    [19:53:06 ERROR]: ------------------------------
    [19:53:06 ERROR]: Current Thread: Thread-3
    [19:53:06 ERROR]:       PID: 26 | Suspended: false | Native: false | State: RUNNABLE
    [19:53:06 ERROR]:       Thread is waiting on monitor(s):
    [19:53:06 ERROR]:               Locked on:[email protected]/java.io.BufferedOutputStream.flush(BufferedOutputStream.java:142)
    [19:53:06 ERROR]:               Locked on:[email protected]/java.io.PrintStream.write(PrintStream.java:538)
    [19:53:06 ERROR]:               Locked on:[email protected]/java.io.PrintStream.write(PrintStream.java:568)
    [19:53:06 ERROR]:               Locked on:[email protected]/java.io.PrintStream.write(PrintStream.java:568)
    [19:53:06 ERROR]:       Stack:
    [19:53:06 ERROR]:               [email protected]/java.io.FileOutputStream.writeBytes(Native Method)
    [19:53:06 ERROR]:               [email protected]/java.io.FileOutputStream.write(FileOutputStream.java:347)
    [19:53:06 ERROR]:               [email protected]/java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:81)
    [19:53:06 ERROR]:               [email protected]/java.io.BufferedOutputStream.flush(BufferedOutputStream.java:142)
    [19:53:06 ERROR]:               [email protected]/java.io.PrintStream.write(PrintStream.java:538)
    [19:53:06 ERROR]:               app//org.fusesource.jansi.AnsiOutputStream.write(AnsiOutputStream.java:82)
    [19:53:06 ERROR]:               [email protected]/java.io.FilterOutputStream.write(FilterOutputStream.java:137)
    [19:53:06 ERROR]:               [email protected]/java.io.PrintStream.write(PrintStream.java:568)
    [19:53:06 ERROR]:               [email protected]/java.io.PrintStream.write(PrintStream.java:568)
    [19:53:06 ERROR]:               [email protected]/java.io.PrintStream.write(PrintStream.java:616)
    [19:53:06 ERROR]:               app//org.bukkit.craftbukkit.v1_12_R1.util.TerminalConsoleWriterThread.run(TerminalConsoleWriterThread.java:36)
    [19:53:06 ERROR]:               [email protected]/java.lang.Thread.run(Thread.java:831)
    [19:53:06 ERROR]: ------------------------------
    [19:53:06 ERROR]: Current Thread: Server console handler
    [19:53:06 ERROR]:       PID: 24 | Suspended: false | Native: true | State: RUNNABLE
    [19:53:06 ERROR]:       Thread is waiting on monitor(s):
    [19:53:06 ERROR]:               Locked on:app//org.bukkit.craftbukkit.libs.jline.internal.NonBlockingInputStream.read(NonBlockingInputStream.java:169)
    [19:53:06 ERROR]:               Locked on:app//org.bukkit.craftbukkit.libs.jline.internal.InputStreamReader.read(InputStreamReader.java:261)
    [19:53:06 ERROR]:               Locked on:app//org.bukkit.craftbukkit.libs.jline.internal.InputStreamReader.read(InputStreamReader.java:198)
    [19:53:06 ERROR]:       Stack:
    [19:53:06 ERROR]:               app//org.fusesource.jansi.internal.Kernel32.ReadConsoleInputW(Native Method)
    [19:53:06 ERROR]:               app//org.fusesource.jansi.internal.Kernel32.readConsoleInputHelper(Kernel32.java:761)
    [19:53:06 ERROR]:               app//org.fusesource.jansi.internal.Kernel32.readConsoleKeyInput(Kernel32.java:794)
    [19:53:06 ERROR]:               app//org.fusesource.jansi.internal.WindowsSupport.readConsoleInput(WindowsSupport.java:97)
    [19:53:06 ERROR]:               app//org.bukkit.craftbukkit.libs.jline.WindowsTerminal.readConsoleInput(WindowsTerminal.java:215)
    [19:53:06 ERROR]:               app//org.bukkit.craftbukkit.libs.jline.WindowsTerminal.access$000(WindowsTerminal.java:55)
    [19:53:06 ERROR]:               app//org.bukkit.craftbukkit.libs.jline.WindowsTerminal$1.read(WindowsTerminal.java:157)
    [19:53:06 ERROR]:               app//org.bukkit.craftbukkit.libs.jline.internal.NonBlockingInputStream.read(NonBlockingInputStream.java:169)
    [19:53:06 ERROR]:               app//org.bukkit.craftbukkit.libs.jline.internal.NonBlockingInputStream.read(NonBlockingInputStream.java:137)
    [19:53:06 ERROR]:               app//org.bukkit.craftbukkit.libs.jline.internal.NonBlockingInputStream.read(NonBlockingInputStream.java:246)
    [19:53:06 ERROR]:               app//org.bukkit.craftbukkit.libs.jline.internal.InputStreamReader.read(InputStreamReader.java:261)
    [19:53:06 ERROR]:               app//org.bukkit.craftbukkit.libs.jline.internal.InputStreamReader.read(InputStreamReader.java:198)
    [19:53:06 ERROR]:               app//org.bukkit.craftbukkit.libs.jline.console.ConsoleReader.readCharacter(ConsoleReader.java:2145)
    [19:53:06 ERROR]:               app//org.bukkit.craftbukkit.libs.jline.console.ConsoleReader.readLine(ConsoleReader.java:2349)
    [19:53:06 ERROR]:               app//net.minecraft.server.v1_12_R1.DedicatedServer$2.run(DedicatedServer.java:85)
    [19:53:06 ERROR]: ------------------------------
    [19:53:06 ERROR]: Current Thread: Spigot Watchdog Thread
    [19:53:06 ERROR]:       PID: 27 | Suspended: false | Native: false | State: RUNNABLE
    [19:53:06 ERROR]:       Stack:
    [19:53:06 ERROR]:               [email protected]/sun.management.ThreadImpl.dumpThreads0(Native Method)
    [19:53:06 ERROR]:               [email protected]/sun.management.ThreadImpl.dumpAllThreads(ThreadImpl.java:521)
    [19:53:06 ERROR]:               [email protected]/sun.management.ThreadImpl.dumpAllThreads(ThreadImpl.java:509)
    [19:53:06 ERROR]:               app//org.spigotmc.WatchdogThread.run(WatchdogThread.java:76)
    [19:53:06 ERROR]: ------------------------------
    [19:53:06 ERROR]: Current Thread: Spigot Metrics Thread
    [19:53:06 ERROR]:       PID: 28 | Suspended: false | Native: false | State: TIMED_WAITING
    [19:53:06 ERROR]:       Stack:
    [19:53:06 ERROR]:               [email protected]/java.lang.Object.wait(Native Method)
    [19:53:06 ERROR]:               [email protected]/java.util.TimerThread.mainLoop(Timer.java:553)
    [19:53:06 ERROR]:               [email protected]/java.util.TimerThread.run(Timer.java:506)
    [19:53:06 ERROR]: ------------------------------
    [19:53:06 ERROR]: Current Thread: ObjectCleanerThread
    [19:53:06 ERROR]:       PID: 29 | Suspended: false | Native: false | State: TIMED_WAITING
    [19:53:06 ERROR]:       Stack:
    [19:53:06 ERROR]:               [email protected]/java.lang.Object.wait(Native Method)
    [19:53:06 ERROR]:               [email protected]/java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:155)
    [19:53:06 ERROR]:               app//io.netty.util.internal.ObjectCleaner$1.run(ObjectCleaner.java:54)
    [19:53:06 ERROR]:               app//io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
    [19:53:06 ERROR]:               [email protected]/java.lang.Thread.run(Thread.java:831)
    [19:53:06 ERROR]: ------------------------------
    [19:53:06 ERROR]: Current Thread: Netty Server IO #0
    [19:53:06 ERROR]:       PID: 30 | Suspended: false | Native: true | State: RUNNABLE
    [19:53:06 ERROR]:       Thread is waiting on monitor(s):
    [19:53:06 ERROR]:               Locked on:[email protected]/sun.nio.ch.SelectorImpl.lockAndDoSelect(SelectorImpl.java:129)
    [19:53:06 ERROR]:               Locked on:[email protected]/sun.nio.ch.SelectorImpl.lockAndDoSelect(SelectorImpl.java:129)
    [19:53:06 ERROR]:       Stack:
    [19:53:06 ERROR]:               [email protected]/sun.nio.ch.WindowsSelectorImpl$SubSelector.poll0(Native Method)
    [19:53:06 ERROR]:               [email protected]/sun.nio.ch.WindowsSelectorImpl$SubSelector.poll(WindowsSelectorImpl.java:353)
    [19:53:06 ERROR]:               [email protected]/sun.nio.ch.WindowsSelectorImpl.doSelect(WindowsSelectorImpl.java:178)
    [19:53:06 ERROR]:               [email protected]/sun.nio.ch.SelectorImpl.lockAndDoSelect(SelectorImpl.java:129)
    [19:53:06 ERROR]:               [email protected]/sun.nio.ch.SelectorImpl.select(SelectorImpl.java:141)
    [19:53:06 ERROR]:               app//io.netty.channel.nio.NioEventLoop.select(NioEventLoop.java:753)
    [19:53:06 ERROR]:               app//io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:409)
    [19:53:06 ERROR]:               app//io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:884)
    [19:53:06 ERROR]:               [email protected]/java.lang.Thread.run(Thread.java:831)
    [19:53:06 ERROR]: ------------------------------
    [19:53:06 ERROR]: Current Thread: File IO Thread
    [19:53:06 ERROR]:       PID: 31 | Suspended: false | Native: false | State: TIMED_WAITING
    [19:53:06 ERROR]:       Stack:
    [19:53:06 ERROR]:               [email protected]/java.lang.Thread.sleep(Native Method)
    [19:53:06 ERROR]:               app//net.minecraft.server.v1_12_R1.FileIOThread.c(SourceFile:51)
    [19:53:06 ERROR]:               app//net.minecraft.server.v1_12_R1.FileIOThread.run(SourceFile:30)
    [19:53:06 ERROR]:               [email protected]/java.lang.Thread.run(Thread.java:831)
    [19:53:06 ERROR]: ------------------------------
    [19:53:06 ERROR]: Current Thread: Netty Server IO #1
    [19:53:06 ERROR]:       PID: 32 | Suspended: false | Native: true | State: RUNNABLE
    [19:53:06 ERROR]:       Thread is waiting on monitor(s):
    [19:53:06 ERROR]:               Locked on:[email protected]/sun.nio.ch.SelectorImpl.lockAndDoSelect(SelectorImpl.java:129)
    [19:53:06 ERROR]:               Locked on:[email protected]/sun.nio.ch.SelectorImpl.lockAndDoSelect(SelectorImpl.java:129)
    [19:53:06 ERROR]:       Stack:
    [19:53:06 ERROR]:               [email protected]/sun.nio.ch.WindowsSelectorImpl$SubSelector.poll0(Native Method)
    [19:53:06 ERROR]:               [email protected]/sun.nio.ch.WindowsSelectorImpl$SubSelector.poll(WindowsSelectorImpl.java:353)
    [19:53:06 ERROR]:               [email protected]/sun.nio.ch.WindowsSelectorImpl.doSelect(WindowsSelectorImpl.java:178)
    [19:53:06 ERROR]:               [email protected]/sun.nio.ch.SelectorImpl.lockAndDoSelect(SelectorImpl.java:129)
    [19:53:06 ERROR]:               [email protected]/sun.nio.ch.SelectorImpl.select(SelectorImpl.java:141)
    [19:53:06 ERROR]:               app//io.netty.channel.nio.NioEventLoop.select(NioEventLoop.java:753)
    [19:53:06 ERROR]:               app//io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:409)
    [19:53:06 ERROR]:               app//io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:884)
    [19:53:06 ERROR]:               [email protected]/java.lang.Thread.run(Thread.java:831)
    [19:53:06 ERROR]: ------------------------------
    [19:53:06 ERROR]: Current Thread: Chunk I/O Executor Thread-1
    [19:53:06 ERROR]:       PID: 36 | Suspended: false | Native: false | State: WAITING
    [19:53:06 ERROR]:       Stack:
    [19:53:06 ERROR]:               [email protected]/jdk.internal.misc.Unsafe.park(Native Method)
    [19:53:06 ERROR]:               [email protected]/java.util.concurrent.locks.LockSupport.park(LockSupport.java:341)
    [19:53:06 ERROR]:               [email protected]/java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionNode.block(AbstractQueuedSynchronizer.java:505)
    [19:53:06 ERROR]:               [email protected]/java.util.concurrent.ForkJoinPool.managedBlock(ForkJoinPool.java:3137)
    [19:53:06 ERROR]:               [email protected]/java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:1614)
    [19:53:06 ERROR]:               [email protected]/java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:435)
    [19:53:06 ERROR]:               [email protected]/java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1056)
    [19:53:06 ERROR]:               [email protected]/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1116)
    [19:53:06 ERROR]:               [email protected]/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630)
    [19:53:06 ERROR]:               [email protected]/java.lang.Thread.run(Thread.java:831)
    [19:53:06 ERROR]: ------------------------------
    [19:53:06 INFO]: Startup script './start.sh' does not exist! Stopping server.
    
    [19:53:06 INFO]: Stopping server
    [19:53:06 INFO]: [RandomTeleport] Disabling RandomTeleport v1.0-SNAPSHOT
    [19:53:06 INFO]: Saving players
    [19:53:06 INFO]: Neplioz lost connection: Server closed
    [19:53:06 INFO]: Neplioz left the game
    [19:53:07 INFO]: Saving worlds
    [19:53:07 INFO]: Saving chunks for level 'world'/overworld
    [19:53:07 INFO]: Saving chunks for level 'world_nether'/the_nether
    [19:53:07 WARN]: java.util.ConcurrentModificationException
    
    [19:53:07 WARN]:        at java.base/java.util.HashMap$HashIterator.nextNode(HashMap.java:1584)
    
    [19:53:07 WARN]:        at java.base/java.util.HashMap$KeyIterator.next(HashMap.java:1607)
    
    [19:53:07 WARN]:        at net.minecraft.server.v1_12_R1.NBTTagCompound.write(SourceFile:58)
    
    [19:53:07 WARN]:        at net.minecraft.server.v1_12_R1.NBTTagCompound.a(SourceFile:425)
    
    [19:53:07 WARN]:        at net.minecraft.server.v1_12_R1.NBTTagCompound.write(SourceFile:60)
    
    [19:53:07 WARN]:        at net.minecraft.server.v1_12_R1.NBTTagCompound.a(SourceFile:425)
    
    [19:53:07 WARN]:        at net.minecraft.server.v1_12_R1.NBTTagCompound.write(SourceFile:60)
    
    [19:53:07 WARN]:        at net.minecraft.server.v1_12_R1.NBTCompressedStreamTools.a(NBTCompressedStreamTools.java:70)
    
    [19:53:07 WARN]:        at net.minecraft.server.v1_12_R1.NBTCompressedStreamTools.a(NBTCompressedStreamTools.java:63)
    
    [19:53:07 WARN]:        at net.minecraft.server.v1_12_R1.NBTCompressedStreamTools.a(NBTCompressedStreamTools.java:35)
    
    [19:53:07 WARN]:        at net.minecraft.server.v1_12_R1.PersistentCollection.a(PersistentCollection.java:100)
    
    [19:53:07 WARN]:        at net.minecraft.server.v1_12_R1.PersistentCollection.a(PersistentCollection.java:82)
    
    [19:53:07 WARN]:        at net.minecraft.server.v1_12_R1.WorldServer.a(WorldServer.java:1108)
    
    [19:53:07 WARN]:        at net.minecraft.server.v1_12_R1.WorldServer.save(WorldServer.java:1050)
    
    [19:53:07 WARN]:        at net.minecraft.server.v1_12_R1.MinecraftServer.saveChunks(MinecraftServer.java:440)
    
    [19:53:07 WARN]:        at net.minecraft.server.v1_12_R1.MinecraftServer.stop(MinecraftServer.java:494)
    
    [19:53:07 WARN]:        at org.spigotmc.RestartCommand.restart(RestartCommand.java:121)
    
    [19:53:07 WARN]:        at org.spigotmc.RestartCommand.restart(RestartCommand.java:40)
    
    [19:53:07 WARN]:        at org.spigotmc.WatchdogThread.run(WatchdogThread.java:85)
    
    [19:53:08 INFO]: Saving chunks for level 'world_the_end'/the_end
     
    Last edited by a moderator: Jul 6, 2023
  2. Offline

    Strahan

    Your code is all ran together in the post. Tell us what line 79 is.
     
Thread Status:
Not open for further replies.

Share This Page