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

添加排行榜GUI,其中包含顶帖总榜、月榜、日榜 #23

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

skongkonga
Copy link

效果就是/bt打开GUI后,可以点击下界之星进入排行榜GUI,其中包含顶帖总榜、月榜、日榜的数据。
另外,我把打开GUI操作改成了异步,不知道会不会有影响,只在1.7.10Uranium测试通过

@CuteLittleSky
Copy link

似乎不能异步 1.20.4 构建了/bt之后
[22:08:06 WARN]: [BBSToper] Plugin BBSToper v3.6.8 generated an exception while executing task 8989968
java.lang.IllegalStateException: InventoryOpenEvent may only be triggered synchronously.
at io.papermc.paper.plugin.manager.PaperEventManager.callEvent(PaperEventManager.java:42) ~[purpur-1.20.4.jar:git-Purpur-2111]
at io.papermc.paper.plugin.manager.PaperPluginManagerImpl.callEvent(PaperPluginManagerImpl.java:126) ~[purpur-1.20.4.jar:git-Purpur-
2111]
at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:617) ~[purpur-api-1.20.4-R0.1-SNAPSHOT.jar:?]
at org.bukkit.craftbukkit.v1_20_R3.event.CraftEventFactory.callInventoryOpenEventWithTitle(CraftEventFactory.java:1492) ~[purpur-1.2
0.4.jar:git-Purpur-2111]
at org.bukkit.craftbukkit.v1_20_R3.event.CraftEventFactory.callInventoryOpenEventWithTitle(CraftEventFactory.java:1471) ~[purpur-1.2
0.4.jar:git-Purpur-2111]
at org.bukkit.craftbukkit.v1_20_R3.entity.CraftHumanEntity.openCustomInventory(CraftHumanEntity.java:362) ~[purpur-1.20.4.jar:git-Pu
rpur-2111]
at org.bukkit.craftbukkit.v1_20_R3.entity.CraftHumanEntity.openInventory(CraftHumanEntity.java:346) ~[purpur-1.20.4.jar:git-Purpur-2
111]
at moe.feo.bbstoper.gui.GUI.lambda$new$0(GUI.java:38) ~[BBSToper-3.6.8.jar:?]
at org.bukkit.craftbukkit.v1_20_R3.scheduler.CraftTask.run(CraftTask.java:101) ~[purpur-1.20.4.jar:git-Purpur-2111]
at org.bukkit.craftbukkit.v1_20_R3.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:57) ~[purpur-1.20.4.jar:git-Purpur-2111]
at com.destroystokyo.paper.ServerSchedulerReportingWrapper.run(ServerSchedulerReportingWrapper.java:22) ~[purpur-1.20.4.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:840) ~[?:?]

@skongkonga
Copy link
Author

似乎不能异步 1.20.4 构建了/bt之后 [22:08:06 WARN]: [BBSToper] Plugin BBSToper v3.6.8 generated an exception while executing task 8989968 java.lang.IllegalStateException: InventoryOpenEvent may only be triggered synchronously. at io.papermc.paper.plugin.manager.PaperEventManager.callEvent(PaperEventManager.java:42) ~[purpur-1.20.4.jar:git-Purpur-2111] at io.papermc.paper.plugin.manager.PaperPluginManagerImpl.callEvent(PaperPluginManagerImpl.java:126) ~[purpur-1.20.4.jar:git-Purpur- 2111] at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:617) ~[purpur-api-1.20.4-R0.1-SNAPSHOT.jar:?] at org.bukkit.craftbukkit.v1_20_R3.event.CraftEventFactory.callInventoryOpenEventWithTitle(CraftEventFactory.java:1492) ~[purpur-1.2 0.4.jar:git-Purpur-2111] at org.bukkit.craftbukkit.v1_20_R3.event.CraftEventFactory.callInventoryOpenEventWithTitle(CraftEventFactory.java:1471) ~[purpur-1.2 0.4.jar:git-Purpur-2111] at org.bukkit.craftbukkit.v1_20_R3.entity.CraftHumanEntity.openCustomInventory(CraftHumanEntity.java:362) ~[purpur-1.20.4.jar:git-Pu rpur-2111] at org.bukkit.craftbukkit.v1_20_R3.entity.CraftHumanEntity.openInventory(CraftHumanEntity.java:346) ~[purpur-1.20.4.jar:git-Purpur-2 111] at moe.feo.bbstoper.gui.GUI.lambda$new$0(GUI.java:38) ~[BBSToper-3.6.8.jar:?] at org.bukkit.craftbukkit.v1_20_R3.scheduler.CraftTask.run(CraftTask.java:101) ~[purpur-1.20.4.jar:git-Purpur-2111] at org.bukkit.craftbukkit.v1_20_R3.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:57) ~[purpur-1.20.4.jar:git-Purpur-2111] at com.destroystokyo.paper.ServerSchedulerReportingWrapper.run(ServerSchedulerReportingWrapper.java:22) ~[purpur-1.20.4.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:840) ~[?:?]

感谢测试,我已经将异步开关写入config,劳烦再测试一下

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants