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

[1.16.5] 放置向北(玩家面向南放置)的贴在方块上的橡木告示牌 报错 #873

Open
FortyTwoCn opened this issue Apr 6, 2024 · 6 comments

Comments

@FortyTwoCn
Copy link

运行环境

Minecraft版本(1.12.2/1.16.5/1.18.2): 1.16.5
构建版本(从/version指令获取): 69069a9 (MC: 1.16.5) 1.16.5-R0.1-SNAPSHOT-
相关模组/插件: 无

描述这个BUG
(如果有报错请附上pastebin链接或上传日志文件)
放置向北(玩家面向南放置)的贴在方块上的橡木告示牌
Caused by: java.lang.NullPointerException
at org.bukkit.material.Sign.getFacing(Sign.java:134) ~[forge:?]
at org.bukkit.material.Sign.toString(Sign.java:233) ~[forge:?]
at java.lang.String.valueOf(String.java:2994) ~[?:1.8.0_392]
at java.lang.StringBuilder.append(StringBuilder.java:131) ~[?:1.8.0_392]
at com.Util.Util.getNBTString(Util.java:121) ~[?:?]
at com.Listeners.WorldBlockPlaceListener.getChunkAmount(WorldBlockPlaceListener.java:36) ~[?:?]
at com.Listeners.WorldBlockPlaceListener.BlockCanBuildEvent2(WorldBlockPlaceListener.java:127) ~[?:?]
at sun.reflect.GeneratedMethodAccessor352.invoke(Unknown Source) ~[?:?]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_392]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_392]
at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:315) ~[forge:?]
... 30 more
导致的问题r
一些插件获取该方块nbt为null导致空指针
复现方法
放置向北(玩家面向南放置)的贴在方块上的橡木告示牌
截图/视频
(如果没有可以忽略)

@Kotori0629
Copy link
Collaborator

at com.Util.Util.getNBTString(Util.java:121) ~[?:?]
at com.Listeners.WorldBlockPlaceListener.getChunkAmount(WorldBlockPlaceListener.java:36) ~[?:?]
at com.Listeners.WorldBlockPlaceListener.BlockCanBuildEvent2(WorldBlockPlaceListener.java:127) ~[?:?]

把代码贴出来我看看

@FortyTwoCn
Copy link
Author

在com。Util.Util.getNBTString(Util.java:121) ~[?:?]在com。Listeners.WorldBlockPlaceListener.getChunkAmount(WorldBlockPlaceListener.java:36) ~[?:?]在com。Listeners.WorldBlockPlaceListener.BlockCanBuildEvent2(WorldBlockPlaceListener.java:127) ~[?:?]

把代码贴出来我看看

https://gitee.com/a1242839141/SelfHomeMain/blob/master/src/com/Listeners/WorldBlockPlaceListener.java

@Kotori0629
Copy link
Collaborator

嗯?在Spigot测试或者在其它混合端测试是怎么样的

@FortyTwoCn
Copy link
Author

嗯?在Spigot测试或者在其它混合端测试是怎么样的

至少1.12.2的catserver用没这个问题

@FortyTwoCn
Copy link
Author

顺便在这里问一下 1.16.5Cat有没有像1.12.2那样服务器TPS低的时候 挖方块 开箱子 不受影响

@FortyTwoCn
Copy link
Author

嗯?在Spigot测试或者在其它混合端测试是怎么样的

在spigot测试正常 但是其他混合端还没测试 有时间我试试 有可能是夸克的锅

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

No branches or pull requests

2 participants