Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incompatible with Mohist #1766

Closed
InkerBot opened this issue May 26, 2021 · 7 comments
Closed

Incompatible with Mohist #1766

InkerBot opened this issue May 26, 2021 · 7 comments
Assignees
Labels
Status: Done This issue has been completed or answered. This pull request has been merged. Type: Enhancement Improvement or modification which is usually a new feature.

Comments

@InkerBot
Copy link

Description

Describe the bug

The plugin throw an Expection when load by Mohist

Steps to reproduce the behavior

  1. Install BentoBox
  2. edit bukkit.yml file, set word generator.
  3. start Server

Expected behavior

Works correctly without Expection reported

Environment

Win10 (19042.985) / AdoptOpenJDK-11.0.10.9-hotspot

Logs

https://paste.ubuntu.com/p/f5pzFf5fbR/

Linked issue

MohistMC/Mohist#1341

Gson's EnumTypeAdapter don't support dynmic Enum(what modified by reflection).
Add EnumTypeAdapter into Gson may solve this problem.
(I can't build bentobox in pc) Likes i did in Skript : SkriptLang/Skript#3918

@Fredthedoggy
Copy link
Contributor

This is not a bentobox error, but a Mohist one, unless you can reproduce it on Paper/Spigot.
Please file a bug report with them

@BONNe
Copy link
Member

BONNe commented May 26, 2021

The crash happens here:

java.lang.NullPointerException: null
	at world.bentobox.bentobox.managers.IslandWorldManager.lambda$addGameMode$11(IslandWorldManager.java:188) ~[?:?]
	at org.bukkit.craftbukkit.v1_16_R3.scheduler.CraftTask.run(CraftTask.java:100) ~[forge:?]
	at org.bukkit.craftbukkit.v1_16_R3.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:462) ~[forge:?]
	at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:999) ~[?:?]
	at net.minecraft.server.dedicated.DedicatedServer.func_71190_q(DedicatedServer.java:333) ~[?:?]
	at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:945) ~[?:?]
	at net.minecraft.server.MinecraftServer.func_240802_v_(MinecraftServer.java:760) ~[?:?]
	at net.minecraft.server.MinecraftServer.func_240783_a_(MinecraftServer.java:270) ~[?:?]
	at java.lang.Thread.run(Thread.java:834) [?:?]

There are some issues with accessing the nether world. Apparently, it does not exist, and as in GameMode config it is specified, that nether will exist, BentoBox crashes.

BentoBox creates these worlds, and in Spigot/Paper they exist. Apparently, Mohist prevents BentoBox from generating the nether world, and it results in this issue.

Crash in AcidIsland is just a result after BentoBox is crashed. addon.getNetherWorld() just does not exist and it is a source of null-pointer and not an entity stream.

@tastybento and this is the reason, why I always asked for disabling every addon, if BentoBox runs into a crash. This is just another instance where a task failed but everything continues to operate.

@InkerBot
Copy link
Author

InkerBot commented May 26, 2021

The crash happens here:

java.lang.NullPointerException: null
	at world.bentobox.bentobox.managers.IslandWorldManager.lambda$addGameMode$11(IslandWorldManager.java:188) ~[?:?]
	at org.bukkit.craftbukkit.v1_16_R3.scheduler.CraftTask.run(CraftTask.java:100) ~[forge:?]
	at org.bukkit.craftbukkit.v1_16_R3.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:462) ~[forge:?]
	at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:999) ~[?:?]
	at net.minecraft.server.dedicated.DedicatedServer.func_71190_q(DedicatedServer.java:333) ~[?:?]
	at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:945) ~[?:?]
	at net.minecraft.server.MinecraftServer.func_240802_v_(MinecraftServer.java:760) ~[?:?]
	at net.minecraft.server.MinecraftServer.func_240783_a_(MinecraftServer.java:270) ~[?:?]
	at java.lang.Thread.run(Thread.java:834) [?:?]

There are some issues with accessing the nether world. Apparently, it does not exist, and as in GameMode config it is specified, that nether will exist, BentoBox crashes.

BentoBox creates these worlds, and in Spigot/Paper they exist. Apparently, Mohist prevents BentoBox from generating the nether world, and it results in this issue.

Crash in AcidIsland is just a result after BentoBox is crashed. addon.getNetherWorld() just does not exist and it is a source of null-pointer and not an entity stream.

This Expection have been fixed in Mohist.
Only the one caused by Gson left

https://paste.ubuntu.com/p/wHQvmNF2w5/

Sry for that I submit an outdate log.

@tastybento
Copy link
Member

@tastybento and this is the reason, why I always asked for disabling every addon, if BentoBox runs into a crash. This is just another instance where a task failed but everything continues to operate.

@BONNe We do try to do that. I am not against that approach and it you think there is a way to improve it, then by all means please submit a PR

In regards to the GSON error, I will look into it.

@tastybento
Copy link
Member

This is probably beyond my ability to fix. It looks like the server has extended the Environment class to include an Enum that doesn't exist in some classes and GSON can't handle that. I tried to run Mohist locally, but I can't get it to run on Java 11 or Java 16 for some reason, so I'm blocked there too. Sorry, it looks like someone more knowledgable about Mohist will need to fix this.

@InkerBot
Copy link
Author

InkerBot commented May 28, 2021

This is probably beyond my ability to fix. It looks like the server has extended the Environment class to include an Enum that doesn't exist in some classes and GSON can't handle that. I tried to run Mohist locally, but I can't get it to run on Java 11 or Java 16 for some reason, so I'm blocked there too. Sorry, it looks like someone more knowledgable about Mohist will need to fix this.

It's easy to fix it with add an enum adapter likes there
SkriptLang/Skript#3918

I want to fix it at first, but i can't build this project due to maven.

By the ways, we may fix Gson, but still have "Hson" "Ison" and more, also snackyaml netty. I don't think it should be fix in Mohist

@tastybento
Copy link
Member

tastybento commented May 28, 2021

That's very cool. Could you submit a PR to BentoBox project to do that? No need, I can write an adapter.

@tastybento tastybento added the Status: Under investigation Investigating the interest and the feasability of the issue. label May 28, 2021
@tastybento tastybento self-assigned this May 28, 2021
@tastybento tastybento added Status: Done This issue has been completed or answered. This pull request has been merged. Type: Enhancement Improvement or modification which is usually a new feature. and removed Status: Under investigation Investigating the interest and the feasability of the issue. labels May 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Done This issue has been completed or answered. This pull request has been merged. Type: Enhancement Improvement or modification which is usually a new feature.
Projects
None yet
Development

No branches or pull requests

4 participants