SBPrime / BlocksHub

API that provides easy access to block loggers and block access controls
Other
28 stars 18 forks source link

Add support for Prism v2.0.6 #22

Closed xanlorimer closed 7 years ago

xanlorimer commented 8 years ago

I am using Prism version 2.0.6, BlocksHub version 2, and WorldEdit version Bukkit-Official (6.1.3;7a097ca), all on Spigot version git-Spigot-078e2f8-7f9fbe5 (MC: 1.10.2) (Implementing API version 1.10.2-R0.1-SNAPSHOT). In case it helps, I'm also running AsyncWorldEdit v2.3.0.

Upon using WorldEdit commands like //set and //sphere, BlocksHub spams the following error in console, which is seemingly related to Prism (and maybe AWE). This error seems to be repeated for every block changed in the WorldEdit operation.

Error Message [02:07:03 INFO]: [BlocksHub] *********************************** [02:07:03 INFO]: [BlocksHub] PrismLogger [02:07:03 INFO]: [BlocksHub] *********************************** [02:07:03 INFO]: [BlocksHub] \* Exception: java.lang.IllegalArgumentException [02:07:03 INFO]: [BlocksHub] \* Error message: java.lang.ClassCastException@5effe8a0 [02:07:03 INFO]: [BlocksHub] \* Stack: [02:07:03 INFO]: [BlocksHub] \* sun.reflect.GeneratedMethodAccessor195.invoke(Unknown Source) [02:07:03 INFO]: [BlocksHub] \* sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [02:07:03 INFO]: [BlocksHub] \* java.lang.reflect.Method.invoke(Method.java:606) [02:07:03 INFO]: [BlocksHub] \* org.primesoft.blockshub.logger.bukkit.prism.PrismLogger.logBlock(PrismLogger.java:160) [02:07:03 INFO]: [BlocksHub] \* org.primesoft.blockshub.Logic.logBlock(Logic.java:366) [02:07:03 INFO]: [BlocksHub] \* org.primesoft.blockshub.Logic.logBlock(Logic.java:329) [02:07:03 INFO]: [BlocksHub] \* org.primesoft.asyncworldedit.blockshub.BlocksHubIntegrationV2.logBlock(BlocksHubIntegrationV2.java:132) [02:07:03 INFO]: [BlocksHub] \* org.primesoft.asyncworldedit.blockshub.BlocksHubBridge.logBlock(BlocksHubBridge.java:84) [02:07:03 INFO]: [BlocksHub] \* org.primesoft.asyncworldedit.worldedit.world.AsyncWorld.logBlock(AsyncWorld.java:1078) [02:07:03 INFO]: [BlocksHub] \* org.primesoft.asyncworldedit.worldedit.world.AsyncWorld.access$200(AsyncWorld.java:97) [02:07:03 INFO]: [BlocksHub] \* org.primesoft.asyncworldedit.worldedit.world.AsyncWorld$8.execute(AsyncWorld.java:292) [02:07:03 INFO]: [BlocksHub] \* org.primesoft.asyncworldedit.worldedit.world.AsyncWorld$8.execute(AsyncWorld.java:282) [02:07:03 INFO]: [BlocksHub] \* org.primesoft.asyncworldedit.blockPlacer.entries.WorldFuncEntryEx.process(WorldFuncEntryEx.java:73) [02:07:03 INFO]: [BlocksHub] \* org.primesoft.asyncworldedit.blockPlacer.BlockPlacer.processQueue(BlockPlacer.java:351) [02:07:03 INFO]: [BlocksHub] \* org.primesoft.asyncworldedit.blockPlacer.BlockPlacer.run(BlockPlacer.java:303) [02:07:03 INFO]: [BlocksHub] \* org.primesoft.asyncworldedit.blockPlacer.BlockPlacer.access$000(BlockPlacer.java:76) [02:07:03 INFO]: [BlocksHub] \* org.primesoft.asyncworldedit.blockPlacer.BlockPlacer$1.run(BlockPlacer.java:213) [02:07:03 INFO]: [BlocksHub] \* org.primesoft.asyncworldedit.blockPlacer.BlockPlacerTask$1.run(BlockPlacerTask.java:75) [02:07:03 INFO]: [BlocksHub] \* org.bukkit.craftbukkit.v1_10_R1.scheduler.CraftTask.run(CraftTask.java:71) [02:07:03 INFO]: [BlocksHub] \* org.bukkit.craftbukkit.v1_10_R1.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:350) [02:07:03 INFO]: [BlocksHub] \* net.minecraft.server.v1_10_R1.MinecraftServer.D(MinecraftServer.java:723) [02:07:03 INFO]: [BlocksHub] \* net.minecraft.server.v1_10_R1.DedicatedServer.D(DedicatedServer.java:400) [02:07:03 INFO]: [BlocksHub] \* net.minecraft.server.v1_10_R1.MinecraftServer.C(MinecraftServer.java:668) [02:07:03 INFO]: [BlocksHub] \* net.minecraft.server.v1_10_R1.MinecraftServer.run(MinecraftServer.java:567) [02:07:03 INFO]: [BlocksHub] \* java.lang.Thread.run(Thread.java:745)

As a side note, I'm also running CoreProtect version 2.12.0 while I phase out Prism. Perhaps having two block logging plugins hooking into BlocksHub at the same time is causing some sort of conflict?

Legoman99573 commented 8 years ago

Prism and Coreprotect are rollback plugins and its dangerous to use both at the same time as 1 will have a conflict with another and pretty much crash your server or not rollback blocks correctly.

xanlorimer commented 8 years ago

Prism and Coreprotect are rollback plugins and its dangerous to use both at the same time as 1 will have a conflict with another and pretty much crash your server or not rollback blocks correctly.

I've tested the server with only Prism enabled, and it still spewed the same error under the same conditions. The error doesn't occur when only CoreProtect is enabled.

Also, I disabled all of Prism's logging functions. Like I said, I'm trying to phase out Prism as it doesn't work properly anymore and is pretty outdated. I just want to keep it on the server for a few months so that I can do lookups on old griefs while we populate the CoreProtect database with new data.

Legoman99573 commented 8 years ago

in 2.0, you dont need to have the bridge, just the BlocksHub plugin. It was rewritten to place all the bridges into 1 jar and saves memory and space.

xanlorimer commented 8 years ago

in 2.0, you dont need to have the bridge, just the BlocksHub plugin. It was rewritten to place all the bridges into 1 jar and saves memory and space.

You mean the BlocksHub bridge? I don't have that installed. I only have AsyncWorldEdit, AsyncWorldEditInjector, BlocksHub (the updated version), Prism, Coreprotect, and WorldEdit, all on a test server and all with their default configs. Upon further testing, I believe that the problem actually has to do with AsyncWorldEdit, as the error only occurs when AWE is enabled with Prism and BlocksHub. CoreProtect and Prism don't seem to interfere with one other at all under normal circumstances. I'll update the issue title to better reflect what's going on here. Do you know if there are any known compatibility issues between Prism and AsyncWorldEdit?

Edit: Just did some more testing, and Prism, CoreProtect, and AWE all play nicely with one another when BlocksHub is disabled, but I need BlocksHub in order to log WorldEdit with CoreProtect. I guess I just need a way for Prism and BlocksHub to ignore one another.

SBPrime commented 8 years ago

You might be using a version of Prism that is not supported. You have Prism v2.0.6, the latest one that I tested it with was 2.0beta. Please send me a link to the version that you are using. I'll test it and update the bridge.

xanlorimer commented 8 years ago

Thanks for the reply! Below are the jars of the plugins that I've been using (AWE, WE, CO, and Prism): plugins.zip

Alternatively, here's a direct link to Prism v2.0.6

mdcfe commented 7 years ago

I can confirm that there is still an issue with Prism. I'm also using Prism 2.0.6 alongside FastAsyncWorldEdit and Paper. Although the trace is not identical, it is effectively the same from the org.primesoft.blockshub.logger.bukkit.prism.PrismLogger.logBlock(PrismLogger.java:160) line upwards:

[19:42:54 INFO]: [BlocksHub] ***********************************
[19:42:54 INFO]: [BlocksHub] PrismLogger
[19:42:54 INFO]: [BlocksHub] ***********************************
[19:42:54 INFO]: [BlocksHub] * Exception: java.lang.IllegalArgumentException
[19:42:54 INFO]: [BlocksHub] * Error message: java.lang.ClassCastException@519f6d8e
[19:42:54 INFO]: [BlocksHub] * Stack:
[19:42:54 INFO]: [BlocksHub] * sun.reflect.GeneratedMethodAccessor211.invoke(Unknown Source)
[19:42:54 INFO]: [BlocksHub] * sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[19:42:54 INFO]: [BlocksHub] * java.lang.reflect.Method.invoke(Method.java:498)
[19:42:54 INFO]: [BlocksHub] * org.primesoft.blockshub.logger.bukkit.prism.PrismLogger.logBlock(PrismLogger.java:160)
[19:42:54 INFO]: [BlocksHub] * org.primesoft.blockshub.Logic.logBlock(Logic.java:366)
[19:42:54 INFO]: [BlocksHub] * com.boydti.fawe.logging.LoggingChangeSet.add(LoggingChangeSet.java:56)
[19:42:54 INFO]: [BlocksHub] * com.boydti.fawe.object.changeset.FaweChangeSet$2$1.run(FaweChangeSet.java:267)
[19:42:54 INFO]: [BlocksHub] * org.bukkit.craftbukkit.v1_11_R1.scheduler.CraftTask.run(CraftTask.java:58)
[19:42:54 INFO]: [BlocksHub] * org.bukkit.craftbukkit.v1_11_R1.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:52)
[19:42:54 INFO]: [BlocksHub] * com.destroystokyo.paper.ServerSchedulerReportingWrapper.run(ServerSchedulerReportingWrapper.java:22)
[19:42:54 INFO]: [BlocksHub] * java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
[19:42:54 INFO]: [BlocksHub] * java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
[19:42:54 INFO]: [BlocksHub] * java.lang.Thread.run(Thread.java:745)
[19:42:54 INFO]: [BlocksHub] ***********************************