Coder Social home page Coder Social logo

journey's People

Contributors

thedeafcreeper avatar whimxiqal avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

journey's Issues

Add ability to make all texts editable

Hi, could you add the functionality where you can edit all the texts of this plugin? It's bad to see those texts also because in my opinion this plugin is excellent for city roleplays.

Console message error

image

I removed the old part in the config but it always appears, so fix it as soon as you can, thanks!

Create paths based on generated waypoints

Create a more complicated path based on data fed to the plugin (as waypoints provided in a coord list).

For instance a path that takes you by certain NPC's or science tool regions with characteristics we'd want you to observe.

Integration with Citizens

The goal with this is to provide a "Guide" functionality, to replace the particle trail that helps players navigate a calculated path today. The integration plugin will likely require a new type of interface that extracts what the particle trail-based JourneySession can do. Then, the Citizens integration can implement a derived abstract class, like a "Guide session", that provides functionality about how to manipulate a guide entity, which would call NPC methods in Citizens.

So most functionality would be in Journey, but just the lowest level interface would be implemented by the incoming JourneyCitizens plugin. Then, users can choose what kind of display to send users, particle trail or other registered ones, like "citizens" as JourneyCitizens would call it, in a flag. Like other flags, it can be set to a default in the config and players may be given permission to use the flag if admins want. Permission should also probably be per-option... More details to come

[1.1] [SQLITE_BUSY] The database file is locked (database is locked) error

I've noticed on the 1.1 build that the database is sometimes the error in the title.

[15:09:43 INFO]: TheDeafCreeper issued server command: /jt Hillbilly
[15:09:43 WARN]: org.sqlite.SQLiteException: [SQLITE_BUSY]  The database file is locked (database is locked)
[15:09:43 WARN]:        at org.sqlite.core.DB.newSQLException(DB.java:1030)
[15:09:43 WARN]:        at org.sqlite.core.DB.newSQLException(DB.java:1042)
[15:09:43 WARN]:        at org.sqlite.core.DB.throwex(DB.java:1007)
[15:09:43 WARN]:        at org.sqlite.core.NativeDB.prepare_utf8(Native Method)
[15:09:43 WARN]:        at org.sqlite.core.NativeDB.prepare(NativeDB.java:137)
[15:09:43 WARN]:        at org.sqlite.core.DB.prepare(DB.java:257)
[15:09:43 WARN]:        at org.sqlite.core.CorePreparedStatement.<init>(CorePreparedStatement.java:45)
[15:09:43 WARN]:        at org.sqlite.jdbc3.JDBC3PreparedStatement.<init>(JDBC3PreparedStatement.java:30)
[15:09:43 WARN]:        at org.sqlite.jdbc4.JDBC4PreparedStatement.<init>(JDBC4PreparedStatement.java:25)
[15:09:43 WARN]:        at org.sqlite.jdbc4.JDBC4Connection.prepareStatement(JDBC4Connection.java:35)
[15:09:43 WARN]:        at org.sqlite.jdbc3.JDBC3Connection.prepareStatement(JDBC3Connection.java:241)
[15:09:43 WARN]:        at org.sqlite.jdbc3.JDBC3Connection.prepareStatement(JDBC3Connection.java:205)
[15:09:43 WARN]:        at Journey-Bukkit-1.0.2-dev-ed6e83f.jar//net.whimxiqal.journey.data.sql.SqlWaypointManager.getWaypointCount(SqlWaypointManager.java:275)
[15:09:43 WARN]:        at Journey-Bukkit-1.0.2-dev-ed6e83f.jar//net.whimxiqal.journey.data.sql.SqlPublicWaypointManager.getCount(SqlPublicWaypointManager.java:87)
[15:09:43 WARN]:        at Journey-Bukkit-1.0.2-dev-ed6e83f.jar//net.whimxiqal.journey.scope.ScopeManager.lambda$registerDefault$5(ScopeManager.java:66)
[15:09:43 WARN]:        at Journey-Bukkit-1.0.2-dev-ed6e83f.jar//net.whimxiqal.journey.ScopeImpl.destinations(ScopeImpl.java:78)
[15:09:43 WARN]:        at Journey-Bukkit-1.0.2-dev-ed6e83f.jar//net.whimxiqal.journey.search.InternalScope.lambda$new$5(InternalScope.java:69)
[15:09:43 WARN]:        at Journey-Bukkit-1.0.2-dev-ed6e83f.jar//net.whimxiqal.journey.search.InternalScope.sessions(InternalScope.java:82)
[15:09:43 WARN]:        at Journey-Bukkit-1.0.2-dev-ed6e83f.jar//net.whimxiqal.journey.scope.ScopeUtil.session(ScopeUtil.java:162)
[15:09:43 WARN]:        at Journey-Bukkit-1.0.2-dev-ed6e83f.jar//net.whimxiqal.journey.scope.ScopeUtil.locationFromSubScopes(ScopeUtil.java:212)
[15:09:43 WARN]:        at Journey-Bukkit-1.0.2-dev-ed6e83f.jar//net.whimxiqal.journey.scope.ScopeUtil.session(ScopeUtil.java:187)
[15:09:43 WARN]:        at Journey-Bukkit-1.0.2-dev-ed6e83f.jar//net.whimxiqal.journey.scope.ScopeUtil.session(ScopeUtil.java:153)
[15:09:43 WARN]:        at Journey-Bukkit-1.0.2-dev-ed6e83f.jar//net.whimxiqal.journey.command.JourneyExecutor$1.visitJourneytoTarget(JourneyExecutor.java:112)
[15:09:43 WARN]:        at Journey-Bukkit-1.0.2-dev-ed6e83f.jar//net.whimxiqal.journey.command.JourneyExecutor$1.visitJourneytoTarget(JourneyExecutor.java:69)
[15:09:43 WARN]:        at Journey-Bukkit-1.0.2-dev-ed6e83f.jar//net.whimxiqal.journey.common.JourneyParser$JourneytoTargetContext.accept(JourneyParser.java:1700)
[15:09:43 WARN]:        at Journey-Bukkit-1.0.2-dev-ed6e83f.jar//net.whimxiqal.journey.libs.antlr.v4.runtime.tree.AbstractParseTreeVisitor.visitChildren(AbstractParseTreeVisitor.java:46)
[15:09:43 WARN]:        at Journey-Bukkit-1.0.2-dev-ed6e83f.jar//net.whimxiqal.journey.command.JourneyExecutor$1.visitJourneyto(JourneyExecutor.java:92)
[15:09:43 WARN]:        at Journey-Bukkit-1.0.2-dev-ed6e83f.jar//net.whimxiqal.journey.command.JourneyExecutor$1.visitJourneyto(JourneyExecutor.java:69)
[15:09:43 WARN]:        at Journey-Bukkit-1.0.2-dev-ed6e83f.jar//net.whimxiqal.journey.common.JourneyParser$JourneytoContext.accept(JourneyParser.java:260)
[15:09:43 WARN]:        at Journey-Bukkit-1.0.2-dev-ed6e83f.jar//net.whimxiqal.journey.libs.antlr.v4.runtime.tree.AbstractParseTreeVisitor.visit(AbstractParseTreeVisitor.java:18)
[15:09:43 WARN]:        at Journey-Bukkit-1.0.2-dev-ed6e83f.jar//net.whimxiqal.journey.libs.mantle.common.MantleCommand.process(MantleCommand.java:124)
[15:09:43 WARN]:        at Journey-Bukkit-1.0.2-dev-ed6e83f.jar//net.whimxiqal.journey.libs.mantle.paper.PaperMantleCommand.execute(PaperMantleCommand.java:90)
[15:09:43 WARN]:        at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:168)
[15:09:43 WARN]:        at org.bukkit.craftbukkit.v1_19_R1.CraftServer.dispatchCommand(CraftServer.java:962)
[15:09:43 WARN]:        at org.bukkit.craftbukkit.v1_19_R1.command.BukkitCommandWrapper.run(BukkitCommandWrapper.java:64)
[15:09:43 WARN]:        at com.mojang.brigadier.CommandDispatcher.execute(CommandDispatcher.java:264)
[15:09:43 WARN]:        at net.minecraft.commands.CommandDispatcher.performCommand(CommandDispatcher.java:313)
[15:09:43 WARN]:        at net.minecraft.commands.CommandDispatcher.a(CommandDispatcher.java:297)
[15:09:43 WARN]:        at net.minecraft.server.network.PlayerConnection.b(PlayerConnection.java:2386)
[15:09:43 WARN]:        at net.minecraft.server.network.PlayerConnection.lambda$handleChatCommand$21(PlayerConnection.java:2340)
[15:09:43 WARN]:        at net.minecraft.util.thread.IAsyncTaskHandler.b(IAsyncTaskHandler.java:59)
[15:09:43 WARN]:        at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1768)
[15:09:43 WARN]:        at net.minecraft.server.TickTask.run(TickTask.java:18)
[15:09:43 WARN]:        at net.minecraft.util.thread.IAsyncTaskHandler.d(IAsyncTaskHandler.java:153)
[15:09:43 WARN]:        at net.minecraft.util.thread.IAsyncTaskHandlerReentrant.d(IAsyncTaskHandlerReentrant.java:24)
[15:09:43 WARN]:        at net.minecraft.server.MinecraftServer.b(MinecraftServer.java:1368)
[15:09:43 WARN]:        at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:185)
[15:09:43 WARN]:        at net.minecraft.util.thread.IAsyncTaskHandler.x(IAsyncTaskHandler.java:126)
[15:09:43 WARN]:        at net.minecraft.server.MinecraftServer.bh(MinecraftServer.java:1345)
[15:09:43 WARN]:        at net.minecraft.server.MinecraftServer.x(MinecraftServer.java:1338)
[15:09:43 WARN]:        at net.minecraft.util.thread.IAsyncTaskHandler.c(IAsyncTaskHandler.java:136)
[15:09:43 WARN]:        at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:1416)
[15:09:43 WARN]:        at net.minecraft.server.MinecraftServer.v(MinecraftServer.java:1194)
[15:09:43 WARN]:        at net.minecraft.server.MinecraftServer.lambda$spin$1(MinecraftServer.java:310)
[15:09:43 WARN]:        at java.base/java.lang.Thread.run(Thread.java:833)
[15:09:43 ERROR]: null
org.bukkit.command.CommandException: Unhandled exception executing 'jt Hillbilly' in net.whimxiqal.journey.libs.mantle.paper.PaperMantleCommand(journeyto)
        at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:178) ~[purpur-api-1.19.2-R0.1-SNAPSHOT.jar:?]
        at org.bukkit.craftbukkit.v1_19_R1.CraftServer.dispatchCommand(CraftServer.java:962) ~[purpur-1.19.2.jar:git-Purpur-1838]
        at org.bukkit.craftbukkit.v1_19_R1.command.BukkitCommandWrapper.run(BukkitCommandWrapper.java:64) ~[purpur-1.19.2.jar:git-Purpur-1838]
        at com.mojang.brigadier.CommandDispatcher.execute(CommandDispatcher.java:264) ~[purpur-1.19.2.jar:?]
        at net.minecraft.commands.Commands.performCommand(Commands.java:313) ~[?:?]
        at net.minecraft.commands.Commands.performCommand(Commands.java:297) ~[?:?]
        at net.minecraft.server.network.ServerGamePacketListenerImpl.performChatCommand(ServerGamePacketListenerImpl.java:2386) ~[?:?]
        at net.minecraft.server.network.ServerGamePacketListenerImpl.lambda$handleChatCommand$21(ServerGamePacketListenerImpl.java:2340) ~[?:?]
        at net.minecraft.util.thread.BlockableEventLoop.lambda$submitAsync$0(BlockableEventLoop.java:59) ~[?:?]
        at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1768) ~[?:?]
        at net.minecraft.server.TickTask.run(TickTask.java:18) ~[purpur-1.19.2.jar:git-Purpur-1838]
        at net.minecraft.util.thread.BlockableEventLoop.doRunTask(BlockableEventLoop.java:153) ~[?:?]
        at net.minecraft.util.thread.ReentrantBlockableEventLoop.doRunTask(ReentrantBlockableEventLoop.java:24) ~[?:?]
        at net.minecraft.server.MinecraftServer.doRunTask(MinecraftServer.java:1368) ~[purpur-1.19.2.jar:git-Purpur-1838]
        at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:185) ~[purpur-1.19.2.jar:git-Purpur-1838]
        at net.minecraft.util.thread.BlockableEventLoop.pollTask(BlockableEventLoop.java:126) ~[?:?]
        at net.minecraft.server.MinecraftServer.pollTaskInternal(MinecraftServer.java:1345) ~[purpur-1.19.2.jar:git-Purpur-1838]
        at net.minecraft.server.MinecraftServer.pollTask(MinecraftServer.java:1338) ~[purpur-1.19.2.jar:git-Purpur-1838]
        at net.minecraft.util.thread.BlockableEventLoop.managedBlock(BlockableEventLoop.java:136) ~[?:?]
        at net.minecraft.server.MinecraftServer.tickServer(MinecraftServer.java:1416) ~[purpur-1.19.2.jar:git-Purpur-1838]
        at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1194) ~[purpur-1.19.2.jar:git-Purpur-1838]
        at net.minecraft.server.MinecraftServer.lambda$spin$1(MinecraftServer.java:310) ~[purpur-1.19.2.jar:git-Purpur-1838]
        at java.lang.Thread.run(Thread.java:833) ~[?:?]
Caused by: net.whimxiqal.journey.data.DataAccessException
        at net.whimxiqal.journey.data.sql.SqlWaypointManager.getWaypointCount(SqlWaypointManager.java:295) ~[Journey-Bukkit-1.0.2-dev-ed6e83f.jar:?]
        at net.whimxiqal.journey.data.sql.SqlPublicWaypointManager.getCount(SqlPublicWaypointManager.java:87) ~[Journey-Bukkit-1.0.2-dev-ed6e83f.jar:?]
        at net.whimxiqal.journey.scope.ScopeManager.lambda$registerDefault$5(ScopeManager.java:66) ~[Journey-Bukkit-1.0.2-dev-ed6e83f.jar:?]
        at net.whimxiqal.journey.ScopeImpl.destinations(ScopeImpl.java:78) ~[Journey-Bukkit-1.0.2-dev-ed6e83f.jar:?]
        at net.whimxiqal.journey.search.InternalScope.lambda$new$5(InternalScope.java:69) ~[Journey-Bukkit-1.0.2-dev-ed6e83f.jar:?]
        at net.whimxiqal.journey.search.InternalScope.sessions(InternalScope.java:82) ~[Journey-Bukkit-1.0.2-dev-ed6e83f.jar:?]
        at net.whimxiqal.journey.scope.ScopeUtil.session(ScopeUtil.java:162) ~[Journey-Bukkit-1.0.2-dev-ed6e83f.jar:?]
        at net.whimxiqal.journey.scope.ScopeUtil.locationFromSubScopes(ScopeUtil.java:212) ~[Journey-Bukkit-1.0.2-dev-ed6e83f.jar:?]
        at net.whimxiqal.journey.scope.ScopeUtil.session(ScopeUtil.java:187) ~[Journey-Bukkit-1.0.2-dev-ed6e83f.jar:?]
        at net.whimxiqal.journey.scope.ScopeUtil.session(ScopeUtil.java:153) ~[Journey-Bukkit-1.0.2-dev-ed6e83f.jar:?]
        at net.whimxiqal.journey.command.JourneyExecutor$1.visitJourneytoTarget(JourneyExecutor.java:112) ~[Journey-Bukkit-1.0.2-dev-ed6e83f.jar:?]
        at net.whimxiqal.journey.command.JourneyExecutor$1.visitJourneytoTarget(JourneyExecutor.java:69) ~[Journey-Bukkit-1.0.2-dev-ed6e83f.jar:?]
        at net.whimxiqal.journey.common.JourneyParser$JourneytoTargetContext.accept(JourneyParser.java:1700) ~[Journey-Bukkit-1.0.2-dev-ed6e83f.jar:?]
        at net.whimxiqal.journey.libs.antlr.v4.runtime.tree.AbstractParseTreeVisitor.visitChildren(AbstractParseTreeVisitor.java:46) ~[Journey-Bukkit-1.0.2-dev-ed6e83f.jar:?]
        at net.whimxiqal.journey.command.JourneyExecutor$1.visitJourneyto(JourneyExecutor.java:92) ~[Journey-Bukkit-1.0.2-dev-ed6e83f.jar:?]
        at net.whimxiqal.journey.command.JourneyExecutor$1.visitJourneyto(JourneyExecutor.java:69) ~[Journey-Bukkit-1.0.2-dev-ed6e83f.jar:?]
        at net.whimxiqal.journey.common.JourneyParser$JourneytoContext.accept(JourneyParser.java:260) ~[Journey-Bukkit-1.0.2-dev-ed6e83f.jar:?]
        at net.whimxiqal.journey.libs.antlr.v4.runtime.tree.AbstractParseTreeVisitor.visit(AbstractParseTreeVisitor.java:18) ~[Journey-Bukkit-1.0.2-dev-ed6e83f.jar:?]
        at net.whimxiqal.journey.libs.mantle.common.MantleCommand.process(MantleCommand.java:124) ~[Journey-Bukkit-1.0.2-dev-ed6e83f.jar:?]
        at net.whimxiqal.journey.libs.mantle.paper.PaperMantleCommand.execute(PaperMantleCommand.java:90) ~[Journey-Bukkit-1.0.2-dev-ed6e83f.jar:?]
        at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:168) ~[purpur-api-1.19.2-R0.1-SNAPSHOT.jar:?]
        ... 22 more

Debug Notices

There should be more debugging messages during search patterns.
Every common search event throughout a search session should send a debug message.
Also, an administrative player who can debug should be able to specify if they want debug messages from everyone or from some individual player.

  • Add debugging messages for every event in a Player Search Session
  • Add a parameter to the debug command and functionality to support all-debugging vs. individual-debugging.

[API] Add the ability to create a Itinerary for a player.

The two main ways I can think of for implementing this would be to either:

  1. Add a function to the Journey(Bukkit?)API that takes a JourneyPlayer/Player and an destination, either Cell or Location, then creates a PlayerDestinationGoalSearchSession for that player.
  2. Add a function onto JourneyPlayer that allows you to specify a destination (probably Cell) to navigate to.

Either way it's probably a good idea to add a way to fetch a JourneyPlayer.

Parallelize Path Searches

When performing a search, Journey spins up a SearchSession, which creates one ItineraryTrial at a time, which in turn creates multiple PathTrials. PathTrials each try to find a path between an origin and a destination and ItineraryTrials wait until the PathTrials come back before determining whether that list of paths do, in fact, form a suitable itinerary.

When trying to find an itinerary, though, the ItineraryTrial already knows which paths it wants. So, there's no reason each of these PathTrials can't be parallelized over the systems available threads.

Changes would include:

  • Adding suitable Future return values from a path trial's search
  • Thread-safe cancel methods on each of the path-trial's search
    • If any of the paths fail during the ItineraryTrial, we should try to cancel all of the ongoing PathTrials. If they in fact returned canceled, then we just ignore whatever else is in the result. Just like today, if any of them actually succeed even if they were cancelled, then we should still treat that like a success for caching purposes.
  • Kicking off all of the PathTrials during an ItineraryTrial and wait for them to all complete (and cancel, if needed, as described above)
  • Today, we have a config parameter that limits how many SearchSessions may be going at one time. Today, this effectively limits how many PathTrials are searching, which in turn limits how much memory the plugin can possibly use, since each of the PathTrials have a limited number of visited nodes during its A* search. This new functionality invalidates that assumption, since each SearchSession may now have multiple searches running in parallel. So, we could instead change the config parameter to something that tracks the maximum number of path algorithms running at one time (we can keep the same name, just change its description). But, we actually still have a problem: this should probably be its own ticket:
    • We can theoretically lock up all the threads on the system, blocking out all other plugins' asynchronous tasks (assuming the player's max searches config parameter is high enough). This can be fixed by instead having a maximum number of threads that can be used at a time. Since we never have multiple path trials running at once on the same thread, then this also keeps the memory usage under a maximum. So, we should do this instead.

Other notes:

  • Multi-threaded behavior is ultimately achieved by just submitting work to Bukkit (and eventually Sponge, etc.) provided async scheduler. I don't see any need to do anything custom and fancy.

Remove lombok

I started using it ages ago for this project, but I've jumped back and forth with actually using it so it just makes for messy files and an unclear overall style. I don't use it in tons of places, so I'd just rather get rid of altogether and create manual getters where needed.

Use Database Pooling

  • Use a database pooling library, like Hikari, to pool database connections.
  • Parallelize DB calls when we can to avoid hanging the main thread. This is probably less work because I think most long-taking DB would be in the searches, which are already async

Better GUI

Some features that have been requested:

  • Customizable, including button colors/materials, padding colors/materials, back-button material, title, etc
  • Buttons to select search flags

Broken 1.20.1 Support

I'm not sure where to start but can someone look into this? Thanks

[01:45:00] [Server thread/INFO]: [Journey] Enabling Journey v1.1.0
[01:45:00] [Server thread/INFO]: [Journey] Initializing Journey...
[01:45:00] [Server thread/ERROR]: Error occurred while enabling Journey v1.1.0 (Is it up to date?)
java.lang.NoClassDefFoundError: net/kyori/adventure/text/ComponentLike
at net.whimxiqal.journey.Journey.(Journey.java:49) ~[?:?]
at net.whimxiqal.journey.Journey.create(Journey.java:69) ~[?:?]
at net.whimxiqal.journey.bukkit.JourneyBukkit.onEnable(JourneyBukkit.java:69) ~[?:?]
at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:266) ~[spigot-api-1.20.1-R0.1-SNAPSHOT.jar:?]
at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:342) ~[spigot-api-1.20.1-R0.1-SNAPSHOT.jar:?]
at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:480) ~[spigot-api-1.20.1-R0.1-SNAPSHOT.jar:?]
at org.bukkit.craftbukkit.v1_20_R1.CraftServer.enablePlugin(CraftServer.java:540) ~[spigot-1.20.1-R0.1-SNAPSHOT.jar:3810-Spigot-c62f4bd-b6b514b]
at org.bukkit.craftbukkit.v1_20_R1.CraftServer.enablePlugins(CraftServer.java:454) ~[spigot-1.20.1-R0.1-SNAPSHOT.jar:3810-Spigot-c62f4bd-b6b514b]
at net.minecraft.server.MinecraftServer.loadWorld0(MinecraftServer.java:589) ~[spigot-1.20.1-R0.1-SNAPSHOT.jar:3810-Spigot-c62f4bd-b6b514b]
at net.minecraft.server.MinecraftServer.loadLevel(MinecraftServer.java:414) ~[spigot-1.20.1-R0.1-SNAPSHOT.jar:3810-Spigot-c62f4bd-b6b514b]
at net.minecraft.server.dedicated.DedicatedServer.e(DedicatedServer.java:250) ~[spigot-1.20.1-R0.1-SNAPSHOT.jar:3810-Spigot-c62f4bd-b6b514b]
at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:973) ~[spigot-1.20.1-R0.1-SNAPSHOT.jar:3810-Spigot-c62f4bd-b6b514b]
at net.minecraft.server.MinecraftServer.lambda$0(MinecraftServer.java:304) ~[spigot-1.20.1-R0.1-SNAPSHOT.jar:3810-Spigot-c62f4bd-b6b514b]
at java.lang.Thread.run(Thread.java:833) ~[?:?]
Caused by: java.lang.ClassNotFoundException: net.kyori.adventure.text.ComponentLike
at org.bukkit.plugin.java.PluginClassLoader.loadClass0(PluginClassLoader.java:147) ~[spigot-api-1.20.1-R0.1-SNAPSHOT.jar:?]
at org.bukkit.plugin.java.PluginClassLoader.loadClass(PluginClassLoader.java:99) ~[spigot-api-1.20.1-R0.1-SNAPSHOT.jar:?]
at java.lang.ClassLoader.loadClass(ClassLoader.java:520) ~[?:?]
... 14 more

Problem with the path across the bridge

Hello, I have a problem with the bridge, the plugin does not want to create a path to lead the player past the bridge shown in the screenshot, what can I change in such a situation? bridge material?

[11:29:20 WARN]: java.lang.ArrayIndexOutOfBoundsException: Index 24 out of bounds for length 24 [11:29:20 WARN]: at org.bukkit.craftbukkit.v1_20_R3.CraftChunkSnapshot.getBlockData(CraftChunkSnapshot.java:109) [11:29:20 WARN]: at Journey-Bukkit-1.2.0.jar//net.whimxiqal.journey.bukkit.chunk.BukkitSessionJourneyChunk.block(BukkitSessionJourneyChunk.java:51) [11:29:20 WARN]: at Journey-Bukkit-1.2.0.jar//net.whimxiqal.journey.chunk.ChunkCacheBlockProvider.toBlock(ChunkCacheBlockProvider.java:66) [11:29:20 WARN]: at Journey-Bukkit-1.2.0.jar//net.whimxiqal.journey.navigation.mode.FlyMode.getDestinations(FlyMode.java:79) [11:29:20 WARN]: at Journey-Bukkit-1.2.0.jar//net.whimxiqal.journey.search.PathTrial.runSafe(PathTrial.java:283) [11:29:20 WARN]: at Journey-Bukkit-1.2.0.jar//net.whimxiqal.journey.search.PathTrial.run(PathTrial.java:195) [11:29:20 WARN]: at Journey-Bukkit-1.2.0.jar//net.whimxiqal.journey.manager.DistributedWorkManager$WorkItemExecutor.run(DistributedWorkManager.java:118) [11:29:20 WARN]: at org.bukkit.craftbukkit.v1_20_R3.scheduler.CraftTask.run(CraftTask.java:101) [11:29:20 WARN]: at org.bukkit.craftbukkit.v1_20_R3.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:57) [11:29:20 WARN]: at com.destroystokyo.paper.ServerSchedulerReportingWrapper.run(ServerSchedulerReportingWrapper.java:22) [11:29:20 WARN]: at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) [11:29:20 WARN]: at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) [11:29:20 WARN]: at java.base/java.lang.Thread.run(Thread.java:833) [11:29:20 ERROR]: [Journey] [Destination Path Search] {session: bcd17bfe-1810-4477-bb7e-14c472524035, origin: {x: -43, y: 173, z: -45, domain: 1}, destination: {x: 27, y: 174, z: -160, domain: 1}, cycles: 9756, state: running, visited: 9757478, from cache: false}: A java.lang.ArrayIndexOutOfBoundsException occurred, failing ![2024-01-23_11 36 57]
2024-01-23_11 36 57

[1.1] Lots of path requests at once causes lag and error.

A bunch of people tried to start paths at once and it caused a ton of lag, and the following error.
(It also caused DB locked errors which is a known issue)

[17:07:28 WARN]: [Journey] Scope from plugin Journey is using an invalid sub-scope id: ITZWBL_. Please notify the plugin owner.
[17:07:28 WARN]: [Journey] Scope from plugin Journey is using an invalid sub-scope id: The3ditor_. Please notify the plugin owner.
[17:07:28 WARN]: [Journey] Scope from plugin Journey is using an invalid sub-scope id: 4DrewsEh. Please notify the plugin owner.
[17:07:28 WARN]: [Journey] Scope from plugin Journey is using an invalid sub-scope id: 2xcl. Please notify the plugin owner.
[17:07:28 WARN]: [Journey] Scope from plugin Journey is using an invalid sub-scope id: ITZWBL_. Please notify the plugin owner.
[17:07:28 WARN]: [Journey] Scope from plugin Journey is using an invalid sub-scope id: The3ditor_. Please notify the plugin owner.
[17:07:28 WARN]: [Journey] Scope from plugin Journey is using an invalid sub-scope id: 4DrewsEh. Please notify the plugin owner.
[17:07:28 WARN]: [Journey] Scope from plugin Journey is using an invalid sub-scope id: 2xcl. Please notify the plugin owner.

Relevant Spark:
https://spark.lucko.me/q8f2EVVCGM

Search Statistics text is not translated or editable

In Journey-Bukkit v1.2.1 it is not possible to set colors for messages, it would be useful to improve this, currently only white color works by default

image

and it is impossible to translate the text in [stats]

image

Remove event dispatcher

I created an event dispatcher to relay events to Bukkit's event system to avoid creating my own event queue, thinking that an event queue was the best way to manage state in sessions. I don't think this is actually a good idea and it's been the source of some bugs and convolution.

The event dispatcher should just be removed altogether and all the places where events are dispatched should just directly call methods where appropriate. For example, many of the Start/Stop Path/Itinerary events just broadcast a debug statement, so that can just be called directly wherever that event is dispatched. It's best to watch out for concurrency issues, though.

For failed searches, return best guess

Journey just fails all searches that don't fully get to the destination (if the search is trying to reach a specific destination in a specific world). In cases like this, Journey should be able to send a full itinerary to a destination "near" the requested destination. The result would include also the distance to the destination.

Canceled searches should still not return anything to the player.

[Feature] Define tunnels without using the API.

Having the ability to define tunnels without needing to use the API, such as with a command or configuration options, would allow people with less development skills to utilize the feature.

Main places I can image you'd want to be able to define tunnels manually would be:

  • When you use Command Blocks to teleport.
  • If you're using a plugin that allows teleportation with no integration addon.

How I imagine implementation would go would either be a command with a format similar to this:
/registertunnel NAME xOrigin yOrigin zOrigin worldName xDest yDest zDest worldName

or a configuration file with entries similar to this (yaml format example):

tunnels:
  name:
    origin:
      x: 0
      y: 0
      z: 0
      world: world
    destination:
      x: 0
      y: 0
      z: 0
      world: world_the_nether

Lag spike after long path is calculated.

Strangest part is that according to spark, TPS dips but MSPT does not spike.

It also does not appear to be the plugin creating the path as the particles already exist when it starts lagging, maybe it's when it cleans up stuff?

(Relevant Spark Timing)
image

Server Version: git-Purpur-1838 (MC: 1.19.2)
Plugin Version: 1.0.2

Re-enable MySQL support

MySQL support was removed for the first official release because it was untested. Once tested, and fixed if broken, MySQL can be re-enabled.

[1.1] Asynchronous Chunk getEntities call

[17:06:41 ERROR]: Thread Craft Scheduler Thread - 824 - Journey failed main thread check: Chunk getEntities call
java.lang.Throwable: null
        at org.spigotmc.AsyncCatcher.catchOp(AsyncCatcher.java:15) ~[purpur-1.19.2.jar:git-Purpur-1838]
        at net.minecraft.server.level.ServerLevel.getEntities(ServerLevel.java:2523) ~[?:?]
        at net.minecraft.server.level.ServerLevel.getEntity(ServerLevel.java:1983) ~[?:?]
        at org.bukkit.craftbukkit.v1_19_R1.CraftServer.getEntity(CraftServer.java:2595) ~[purpur-1.19.2.jar:git-Purpur-1838]
        at org.bukkit.Bukkit.getEntity(Bukkit.java:2060) ~[purpur-api-1.19.2-R0.1-SNAPSHOT.jar:?]
        at net.whimxiqal.journey.bukkit.BukkitPlatformProxy.entityCellLocation(BukkitPlatformProxy.java:142) ~[Journey-Bukkit-1.0.2-dev-ed6e83f.jar:?]
        at net.whimxiqal.journey.command.JourneyExecutor$1.destinationSearch(JourneyExecutor.java:348) ~[Journey-Bukkit-1.0.2-dev-ed6e83f.jar:?]
        at net.whimxiqal.journey.command.JourneyExecutor$1.lambda$personalWaypointSearch$10(JourneyExecutor.java:331) ~[Journey-Bukkit-1.0.2-dev-ed6e83f.jar:?]
        at org.bukkit.craftbukkit.v1_19_R1.scheduler.CraftTask.run(CraftTask.java:101) ~[purpur-1.19.2.jar:git-Purpur-1838]
        at org.bukkit.craftbukkit.v1_19_R1.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:57) ~[purpur-1.19.2.jar:git-Purpur-1838]
        at com.destroystokyo.paper.ServerSchedulerReportingWrapper.run(ServerSchedulerReportingWrapper.java:22) ~[purpur-1.19.2.jar:?]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) ~[?:?]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) ~[?:?]
        at java.lang.Thread.run(Thread.java:833) ~[?:?]
[17:06:41 WARN]: [Journey] Plugin Journey v1.0.2-dev-ed6e83f generated an exception while executing task 12446829
java.lang.IllegalStateException: Asynchronous Chunk getEntities call!
        at org.spigotmc.AsyncCatcher.catchOp(AsyncCatcher.java:16) ~[purpur-1.19.2.jar:git-Purpur-1838]
        at net.minecraft.server.level.ServerLevel.getEntities(ServerLevel.java:2523) ~[?:?]
        at net.minecraft.server.level.ServerLevel.getEntity(ServerLevel.java:1983) ~[?:?]
        at org.bukkit.craftbukkit.v1_19_R1.CraftServer.getEntity(CraftServer.java:2595) ~[purpur-1.19.2.jar:git-Purpur-1838]
        at org.bukkit.Bukkit.getEntity(Bukkit.java:2060) ~[purpur-api-1.19.2-R0.1-SNAPSHOT.jar:?]
        at net.whimxiqal.journey.bukkit.BukkitPlatformProxy.entityCellLocation(BukkitPlatformProxy.java:142) ~[Journey-Bukkit-1.0.2-dev-ed6e83f.jar:?]
        at net.whimxiqal.journey.command.JourneyExecutor$1.destinationSearch(JourneyExecutor.java:348) ~[Journey-Bukkit-1.0.2-dev-ed6e83f.jar:?]
        at net.whimxiqal.journey.command.JourneyExecutor$1.lambda$personalWaypointSearch$10(JourneyExecutor.java:331) ~[Journey-Bukkit-1.0.2-dev-ed6e83f.jar:?]
        at org.bukkit.craftbukkit.v1_19_R1.scheduler.CraftTask.run(CraftTask.java:101) ~[purpur-1.19.2.jar:git-Purpur-1838]
        at org.bukkit.craftbukkit.v1_19_R1.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:57) ~[purpur-1.19.2.jar:git-Purpur-1838]
        at com.destroystokyo.paper.ServerSchedulerReportingWrapper.run(ServerSchedulerReportingWrapper.java:22) ~[purpur-1.19.2.jar:?]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) ~[?:?]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) ~[?:?]
        at java.lang.Thread.run(Thread.java:833) ~[?:?]

Add command support for common Minecraft scenarios

Journey calculation can be used in many more scenarios than just static-destination solving.

An ongoing list of more features to implement into the command structure:

  • Calculate fastest way to get to surface when mining in caves

Improve Messaging

I never really liked most of the messages that are sent to the user for every-day type of stuff. Like "Searching..." is pretty bland, and I don't love the gold-orange color that's supposed to represent INFO statements. Also, "Success! Please follow the path" is pretty bad too, especially because sometimes the first move is a prompt like "type the following command", so "following the path" isn't even accurate.

A proposal should be made for

  • a good, concise color scheme for messages,
  • a list of concise wording for each of the known messages (also helpful for the eventual multi-language support),
  • and a concrete system for when and where to use hover-text and title/subtitle messages.

Also, since we've married ourselves to Kyori Adventure, we should use it to its fullest extent.

Feature request

A new tool has been added that allows you to set a one-time start/end point by left/right click.

Command:

  • /journey tool
    Get tool

Permissions

  • journey.command.tool
    Whether to automatically calculate the path?
  • journey.command.tool.autocalculation

Maybe need to add a cooldown.

config.yml
cooldown-time: <number>
(Second

English is not my language, so please forgive me if it means weird

[Feature] Roads

Roads would be one or more patterns you could provide that tell Journey a specific path speeds you up.

For example, on a server I develop for you can gain a speed boost by putting copper slabs under any block, so if I were to register that setup as a road I would so something like:
registerRoadPattern(["*", "COPPER_SLAB"], 1.25) (list of materials, speed multiplier).

The main issues I could see arising from this are:

  • Lag, especially with complex patterns.
  • The system could be to complex, leading to people not using it.
  • Actual implementation, with how standalone most of the codebase is converting a string to a material could be pretty complicated.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.