hakan-krgn / spigot-injection Goto Github PK
View Code? Open in Web Editor NEWDependency injection library for spigot.
Home Page: https://www.spigotmc.org/resources/112013/
License: MIT License
Dependency injection library for spigot.
Home Page: https://www.spigotmc.org/resources/112013/
License: MIT License
I currently need only dependency injection
How is TabComplete supposed to be implemented for commands made through the annotations?
Hello. I'm trying to save an object to a database using your library. I looked at the example in the full plugin, there are no @querั annotations for the save delete methods, etc. That's why I didn't add it to my test plugin. At the same time, I get an exception. Please take a look at the attachments below.
[16:51:24 ERROR]: Could not pass event BlockDestroyEvent to hibernate-test-for-spigot v1.0-SNAPSHOT
java.lang.reflect.InvocationTargetException: null
at jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:118) ~[?:?]
at java.lang.reflect.Method.invoke(Method.java:580) ~[?:?]
at com.hakan.spinjection.utils.ReflectionUtils.invokeMethod(ReflectionUtils.java:47) ~[hibernate-test-for-spigot-1.0-SNAPSHOT.jar:?]
at com.hakan.spinjection.utils.ReflectionUtils.runMethod(ReflectionUtils.java:69) ~[hibernate-test-for-spigot-1.0-SNAPSHOT.jar:?]
at com.hakan.spinjection.listener.executor.ListenerExecutor.execute(ListenerExecutor.java:115) ~[hibernate-test-for-spigot-1.0-SNAPSHOT.jar:?]
at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:77) ~[purpur-api-1.20.2-R0.1-SNAPSHOT.jar:git-Purpur-2082]
at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70) ~[purpur-api-1.20.2-R0.1-SNAPSHOT.jar:?]
at io.papermc.paper.plugin.manager.PaperEventManager.callEvent(PaperEventManager.java:54) ~[purpur-1.20.2.jar:git-Purpur-2082]
at io.papermc.paper.plugin.manager.PaperPluginManagerImpl.callEvent(PaperPluginManagerImpl.java:126) ~[purpur-1.20.2.jar:git-Purpur-2082]
at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:617) ~[purpur-api-1.20.2-R0.1-SNAPSHOT.jar:?]
at org.bukkit.event.Event.callEvent(Event.java:45) ~[purpur-api-1.20.2-R0.1-SNAPSHOT.jar:?]
at net.minecraft.world.level.Level.destroyBlock(Level.java:1132) ~[?:?]
at net.minecraft.world.level.block.Block.updateOrDestroy(Block.java:205) ~[purpur-1.20.2.jar:git-Purpur-2082]
at net.minecraft.world.level.redstone.NeighborUpdater.executeShapeUpdate(NeighborUpdater.java:50) ~[purpur-1.20.2.jar:git-Purpur-2082]
at net.minecraft.world.level.redstone.CollectingNeighborUpdater$ShapeUpdate.runNext(CollectingNeighborUpdater.java:158) ~[?:?]
at net.minecraft.world.level.redstone.CollectingNeighborUpdater.runUpdates(CollectingNeighborUpdater.java:79) ~[purpur-1.20.2.jar:git-Purpur-2082]
at net.minecraft.world.level.redstone.CollectingNeighborUpdater.addAndRun(CollectingNeighborUpdater.java:63) ~[purpur-1.20.2.jar:git-Purpur-2082]
at net.minecraft.world.level.redstone.CollectingNeighborUpdater.shapeUpdate(CollectingNeighborUpdater.java:30) ~[purpur-1.20.2.jar:git-Purpur-2082]
at net.minecraft.world.level.Level.neighborShapeChanged(Level.java:1180) ~[?:?]
at net.minecraft.world.level.block.state.BlockBehaviour$BlockStateBase.updateNeighbourShapes(BlockBehaviour.java:1183) ~[?:?]
at net.minecraft.world.level.Level.notifyAndUpdatePhysics(Level.java:1095) ~[?:?]
at net.minecraft.world.level.Level.setBlock(Level.java:1041) ~[?:?]
at net.minecraft.world.level.Level.setBlock(Level.java:955) ~[?:?]
at net.minecraft.world.level.Level.removeBlock(Level.java:1115) ~[?:?]
at net.minecraft.world.level.block.FireBlock.trySpread(FireBlock.java:300) ~[?:?]
at net.minecraft.world.level.block.FireBlock.tick(FireBlock.java:212) ~[?:?]
at net.minecraft.world.level.block.state.BlockBehaviour$BlockStateBase.tick(BlockBehaviour.java:1205) ~[?:?]
at net.minecraft.server.level.ServerLevel.tickBlock(ServerLevel.java:1417) ~[?:?]
at net.minecraft.world.ticks.LevelTicks.runCollectedTicks(LevelTicks.java:197) ~[?:?]
at net.minecraft.world.ticks.LevelTicks.tick(LevelTicks.java:94) ~[?:?]
at net.minecraft.server.level.ServerLevel.tick(ServerLevel.java:863) ~[?:?]
at net.minecraft.server.MinecraftServer.tickChildren(MinecraftServer.java:1577) ~[purpur-1.20.2.jar:git-Purpur-2082]
at net.minecraft.server.dedicated.DedicatedServer.tickChildren(DedicatedServer.java:486) ~[purpur-1.20.2.jar:git-Purpur-2082]
at net.minecraft.server.MinecraftServer.tickServer(MinecraftServer.java:1406) ~[purpur-1.20.2.jar:git-Purpur-2082]
at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1177) ~[purpur-1.20.2.jar:git-Purpur-2082]
at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:320) ~[purpur-1.20.2.jar:git-Purpur-2082]
at java.lang.Thread.run(Thread.java:1583) ~[?:?]
Caused by: java.lang.RuntimeException: method must be annotated with @Query!
at com.hakan.spinjection.database.executor.DatabaseExecutor.postCall(DatabaseExecutor.java:126) ~[hibernate-test-for-spigot-1.0-SNAPSHOT.jar:?]
at com.hakan.spinjection.database.executor.DatabaseExecutor.preCall(DatabaseExecutor.java:112) ~[hibernate-test-for-spigot-1.0-SNAPSHOT.jar:?]
at com.hakan.spinjection.utils.ProxyUtils.lambda$create$0(ProxyUtils.java:34) ~[hibernate-test-for-spigot-1.0-SNAPSHOT.jar:?]
at jdk.proxy4.$Proxy69.save(Unknown Source) ~[hibernate-test-for-spigot-1.0-SNAPSHOT.jar:?]
at org.testing.hibernatetestforspigot.listener.BreakBlockListener.onBlockBreak(BreakBlockListener.java:25) ~[hibernate-test-for-spigot-1.0-SNAPSHOT.jar:?]
at jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103) ~[?:?]
... 36 more
As a result, an annotation is needed even for standard methods, and this point was omitted for the sake of simplicity of the example?
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.