lorenzo0111 / electionsplus Goto Github PK
View Code? Open in Web Editor NEWPolitical Elections spigot plugin
License: MIT License
Political Elections spigot plugin
License: MIT License
Once again, thanks for your awesome plugin.
There is a warn on start up of the plugin.
Here is the entire log: https://pastebin.com/sdEtQECE
When attempting to create elections on 1.18.2, the following error occurs:
03.05 01:33:00 [Server] INFO org.bukkit.command.CommandException: Unhandled exception executing command 'elections' in plugin ElectionsPlus v1.6
03.05 01:33:00 [Server] INFO at org.bukkit.command.PluginCommand.execute(PluginCommand.java:47) ~[paper-api-1.18.2-R0.1-SNAPSHOT.jar:?]
03.05 01:33:00 [Server] INFO at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:159) ~[paper-api-1.18.2-R0.1-SNAPSHOT.jar:?]
03.05 01:33:00 [Server] INFO at org.bukkit.craftbukkit.v1_18_R2.CraftServer.dispatchCommand(CraftServer.java:906) ~[paper-1.18.2.jar:git-Paper-289]
03.05 01:33:00 [Server] INFO at net.minecraft.server.network.ServerGamePacketListenerImpl.handleCommand(ServerGamePacketListenerImpl.java:2306) ~[?:?]
03.05 01:33:00 [Server] INFO at net.minecraft.server.network.ServerGamePacketListenerImpl.handleChat(ServerGamePacketListenerImpl.java:2117) ~[?:?]
03.05 01:33:00 [Server] INFO at net.minecraft.server.network.ServerGamePacketListenerImpl.handleChat(ServerGamePacketListenerImpl.java:2098) ~[?:?]
03.05 01:33:00 [Server] INFO at net.minecraft.network.protocol.game.ServerboundChatPacket.handle(ServerboundChatPacket.java:46) ~[?:?]
03.05 01:33:00 [Server] INFO at net.minecraft.network.protocol.game.ServerboundChatPacket.a(ServerboundChatPacket.java:6) ~[?:?]
03.05 01:33:00 [Server] INFO at net.minecraft.network.protocol.PacketUtils.lambda$ensureRunningOnSameThread$1(PacketUtils.java:51) ~[?:?]
03.05 01:33:00 [Server] INFO at net.minecraft.server.TickTask.run(TickTask.java:18) ~[paper-1.18.2.jar:git-Paper-289]
03.05 01:33:00 [Server] INFO at net.minecraft.util.thread.BlockableEventLoop.doRunTask(BlockableEventLoop.java:153) ~[?:?]
03.05 01:33:00 [Server] INFO at net.minecraft.util.thread.ReentrantBlockableEventLoop.doRunTask(ReentrantBlockableEventLoop.java:23) ~[?:?]
03.05 01:33:00 [Server] INFO at net.minecraft.server.MinecraftServer.doRunTask(MinecraftServer.java:1399) ~[paper-1.18.2.jar:git-Paper-289]
03.05 01:33:00 [Server] INFO at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:188) ~[paper-1.18.2.jar:git-Paper-289]
03.05 01:33:00 [Server] INFO at net.minecraft.util.thread.BlockableEventLoop.pollTask(BlockableEventLoop.java:126) ~[?:?]
03.05 01:33:00 [Server] INFO at net.minecraft.server.MinecraftServer.pollTaskInternal(MinecraftServer.java:1376) ~[paper-1.18.2.jar:git-Paper-289]
03.05 01:33:00 [Server] INFO at net.minecraft.server.MinecraftServer.pollTask(MinecraftServer.java:1369) ~[paper-1.18.2.jar:git-Paper-289]
03.05 01:33:00 [Server] INFO at net.minecraft.util.thread.BlockableEventLoop.managedBlock(BlockableEventLoop.java:136) ~[?:?]
03.05 01:33:00 [Server] INFO at net.minecraft.server.MinecraftServer.waitUntilNextTick(MinecraftServer.java:1347) ~[paper-1.18.2.jar:git-Paper-289]
03.05 01:33:00 [Server] INFO at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1229) ~[paper-1.18.2.jar:git-Paper-289]
03.05 01:33:00 [Server] INFO at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:315) ~[paper-1.18.2.jar:git-Paper-289]
03.05 01:33:00 [Server] INFO at java.lang.Thread.run(Thread.java:833) ~[?:?]
03.05 01:33:00 [Server] INFO Caused by: java.lang.NoSuchMethodError: 'net.kyori.adventure.text.minimessage.MiniMessage net.kyori.adventure.text.minimessage.MiniMessage.get()'
03.05 01:33:00 [Server] INFO at me.lorenzo0111.elections.handlers.Messages.component(Messages.java:87) ~[elections-spigot.jar:?]
03.05 01:33:00 [Server] INFO at me.lorenzo0111.elections.handlers.Messages.component(Messages.java:81) ~[elections-spigot.jar:?]
03.05 01:33:00 [Server] INFO at me.lorenzo0111.elections.handlers.Messages.componentString(Messages.java:73) ~[elections-spigot.jar:?]
03.05 01:33:00 [Server] INFO at me.lorenzo0111.elections.menus.CreateElectionMenu.(CreateElectionMenu.java:52) ~[elections-spigot.jar:?]
03.05 01:33:00 [Server] INFO at me.lorenzo0111.elections.commands.childs.CreateChild.handleSubcommand(CreateChild.java:59) ~[elections-spigot.jar:?]
03.05 01:33:00 [Server] INFO at me.lorenzo0111.pluginslib.command.SubCommand.perform(SubCommand.java:68) ~[elections-spigot.jar:?]
03.05 01:33:00 [Server] INFO at me.lorenzo0111.pluginslib.command.Command.onCommand(Command.java:54) ~[elections-spigot.jar:?]
03.05 01:33:00 [Server] INFO at org.bukkit.command.PluginCommand.execute(PluginCommand.java:45) ~[paper-api-1.18.2-R0.1-SNAPSHOT.jar:?]
03.05 01:33:00 [Server] INFO ... 21 more
Hello, everytime I try to launch my 1.17.1 Spigot server i get this error:
[18:12:42] [Server thread/INFO]: [ElectionsPlus] Enabling ElectionsPlus v1.3
[18:12:42] [Server thread/INFO]: [ElectionsPlus] Loading libraries..
[18:12:42] [Server thread/INFO]: [ElectionsPlus] Note: This might take a few minutes on first run.
[18:12:45] [Server thread/ERROR]: Error occurred while enabling ElectionsPlus v1.3 (Is it up to date?)
io.github.slimjar.injector.InjectionFailedException: SlimJar failed to inject dependency: name -> Dependency{groupId='mysql', artifactId='mysql-connector-java', version='8.0.25', snapshotId='null', transitive=[Dependency{groupId='com.google.protobuf', artifactId='protobuf-java', version='3.11.4', snapshotId='null', transitive=[]}]}
at io.github.slimjar.injector.SimpleDependencyInjector.injectDependencies(SimpleDependencyInjector.java:63) ~[?:?]
at io.github.slimjar.injector.SimpleDependencyInjector.inject(SimpleDependencyInjector.java:50) ~[?:?]
at io.github.slimjar.app.builder.InjectingApplicationBuilder.build(InjectingApplicationBuilder.java:55) ~[?:?]
at me.lorenzo0111.pluginslib.dependency.slimjar.SlimJarDependencyManager.build(SlimJarDependencyManager.java:28) ~[?:?]
at me.lorenzo0111.elections.ElectionsPlus.load(ElectionsPlus.java:153) ~[?:?]
at me.lorenzo0111.elections.ElectionsPlus.onEnable(ElectionsPlus.java:77) ~[?:?]
at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:263) ~[slavicraft17.jar:3203-Spigot-18c71bf-aa69d1c]
at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:342) ~[slavicraft17.jar:3203-Spigot-18c71bf-aa69d1c]
at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:480) ~[slavicraft17.jar:3203-Spigot-18c71bf-aa69d1c]
at org.bukkit.craftbukkit.v1_17_R1.CraftServer.enablePlugin(CraftServer.java:505) ~[slavicraft17.jar:3203-Spigot-18c71bf-aa69d1c]
at org.bukkit.craftbukkit.v1_17_R1.CraftServer.enablePlugins(CraftServer.java:419) ~[slavicraft17.jar:3203-Spigot-18c71bf-aa69d1c]
at net.minecraft.server.MinecraftServer.loadWorld(MinecraftServer.java:604) ~[slavicraft17.jar:3203-Spigot-18c71bf-aa69d1c]
at net.minecraft.server.dedicated.DedicatedServer.init(DedicatedServer.java:266) ~[slavicraft17.jar:3203-Spigot-18c71bf-aa69d1c]
at net.minecraft.server.MinecraftServer.x(MinecraftServer.java:995) ~[slavicraft17.jar:3203-Spigot-18c71bf-aa69d1c]
at net.minecraft.server.MinecraftServer.lambda$0(MinecraftServer.java:303) ~[slavicraft17.jar:3203-Spigot-18c71bf-aa69d1c]
at java.lang.Thread.run(Thread.java:831) [?:?]
Caused by: java.nio.file.NoSuchFileException: F:\Serwery\Minecraft%20-%20serwery\Slavicraft%20III%20Edycja%20Reanimacja%20Trupa\plugins\ElectionsPlus\libs\mysql\mysql-connector-java\8.0.25\relocated\ElectionsPlus\mysql-connector-java-8.0.25.jar
at sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:85) ~[?:?]
at sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:103) ~[?:?]
at sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:108) ~[?:?]
at sun.nio.fs.WindowsFileAttributeViews$Basic.readAttributes(WindowsFileAttributeViews.java:53) ~[?:?]
at sun.nio.fs.WindowsFileAttributeViews$Basic.readAttributes(WindowsFileAttributeViews.java:38) ~[?:?]
at sun.nio.fs.WindowsFileSystemProvider.readAttributes(WindowsFileSystemProvider.java:199) ~[?:?]
at java.nio.file.Files.readAttributes(Files.java:1843) ~[?:?]
at java.util.zip.ZipFile$Source.get(ZipFile.java:1230) ~[?:?]
at java.util.zip.ZipFile$CleanableResource.<init>(ZipFile.java:707) ~[?:?]
at java.util.zip.ZipFile.<init>(ZipFile.java:241) ~[?:?]
at java.util.zip.ZipFile.<init>(ZipFile.java:171) ~[?:?]
at java.util.jar.JarFile.<init>(JarFile.java:348) ~[?:?]
at java.util.jar.JarFile.<init>(JarFile.java:319) ~[?:?]
at java.util.jar.JarFile.<init>(JarFile.java:258) ~[?:?]
at io.github.slimjar.injector.loader.InstrumentationInjectable.inject(InstrumentationInjectable.java:70) ~[?:?]
at io.github.slimjar.injector.SimpleDependencyInjector.injectDependencies(SimpleDependencyInjector.java:60) ~[?:?]
... 15 more
On initial load of plugin (no config present in plugins/
), I get the following start up log: https://pastebin.com/wj9p89Bt (no issues).
I then stop the server with the stop
command and change chron.enabled
to true
in the config.
After starting the server backup, I get the following error start up log (with error): https://pastebin.com/PuLRdMti
I have tried changing the cron expression to the specified [seconds,minutes,hours,daysOfMonth,months,daysOfWeek,years]
format, but that does not seem to work.
I added a new table to make it so players can vote by hitting a block. ("blocks", see PR #124 โ I'm still not sure if this is the best way to do it since I'm fairly new to Minecraft plugin coding & Java).
On first run, when the Sqlite database and tables are created, the first time the code queries the table (in my case during command registration), I get the following "table does not exist" error. On subsequent runs, or on the first run if I do the query from another thread (i.e. while handling player join event), it works correctly.
The root cause is that the table is created asynchronously (see the implementation of Table.create()), so that it hasn't yet been created when the command registration runs and queries the table. I'm surprised that this isn't causing more issues with the existing tables, but maybe nothing is querying them right away.
[19:09:15 WARN]: org.sqlite.SQLiteException: [SQLITE_ERROR] SQL error or missing database (no such table: blocks)
[19:09:15 WARN]: at org.sqlite.core.DB.newSQLException(DB.java:1179)
[19:09:15 WARN]: at org.sqlite.core.DB.newSQLException(DB.java:1190)
[19:09:15 WARN]: at org.sqlite.core.DB.throwex(DB.java:1150)
[19:09:15 WARN]: at org.sqlite.core.NativeDB.prepare_utf8(Native Method)
[19:09:15 WARN]: at org.sqlite.core.NativeDB.prepare(NativeDB.java:126)
[19:09:15 WARN]: at org.sqlite.core.DB.prepare(DB.java:264)
[19:09:15 WARN]: at org.sqlite.jdbc3.JDBC3Statement.lambda$executeQuery$1(JDBC3Statement.java:81)
[19:09:15 WARN]: at org.sqlite.jdbc3.JDBC3Statement.withConnectionTimeout(JDBC3Statement.java:454)
[19:09:15 WARN]: at org.sqlite.jdbc3.JDBC3Statement.executeQuery(JDBC3Statement.java:79)
[19:09:15 WARN]: at elections-spigot.jar//me.lorenzo0111.elections.database.DatabaseManager.lambda$getElectionBlocks$11(DatabaseManager.java:399)
[19:09:15 WARN]: at org.bukkit.craftbukkit.v1_19_R3.scheduler.CraftTask.run(CraftTask.java:101)
[19:09:15 WARN]: at org.bukkit.craftbukkit.v1_19_R3.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:57)
[19:09:15 WARN]: at com.destroystokyo.paper.ServerSchedulerReportingWrapper.run(ServerSchedulerReportingWrapper.java:22)
[19:09:15 WARN]: at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
[19:09:15 WARN]: at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
[19:09:15 WARN]: at java.base/java.lang.Thread.run(Thread.java:833)
There are two solutions I can think of:
I implemented the 2nd option in PR #124, and the issue no longer happens for me...
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.