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

NPE for EffConnect #4349

Closed
1 task
blueheaven566 opened this issue Oct 5, 2021 · 3 comments
Closed
1 task

NPE for EffConnect #4349

blueheaven566 opened this issue Oct 5, 2021 · 3 comments
Labels
bug An issue that needs to be fixed. Alternatively, a PR fixing an issue. completed The issue has been fully resolved and the change will be in the next Skript update. priority: low Issues that are not harmful to the experience but are related to useful changes or additions.

Comments

@blueheaven566
Copy link

blueheaven566 commented Oct 5, 2021

Skript/Server Version

Bug Description

Expected Behavior

Steps to Reproduce

Errors or Screenshots

[22:30:17 ERROR]: #!#!
[22:30:17 ERROR]: #!#! [Skript] Severe Error:
[22:30:17 ERROR]: #!#!
[22:30:17 ERROR]: #!#! Something went horribly wrong with Skript.
[22:30:17 ERROR]: #!#! This issue is NOT your fault! You probably can't fix it yourself, either.
[22:30:17 ERROR]: #!#! You should report it at https://github.com/SkriptLang/Skript/issues. Please copy paste this report there (or use paste service).
[22:30:17 ERROR]: #!#! This ensures that your issue is noticed and will be fixed as soon as possible.
[22:30:17 ERROR]: #!#!
[22:30:17 ERROR]: #!#! Stack trace:
[22:30:17 ERROR]: #!#! java.lang.NullPointerException
[22:30:17 ERROR]: #!#!     at ch.njol.skript.util.Utils.sendPluginMessage(Utils.java:473)
[22:30:17 ERROR]: #!#!     at ch.njol.skript.util.Utils.sendPluginMessage(Utils.java:419)
[22:30:17 ERROR]: #!#!     at ch.njol.skript.effects.EffConnect.execute(EffConnect.java:66)
[22:30:17 ERROR]: #!#!     at ch.njol.skript.lang.Effect.run(Effect.java:51)
[22:30:17 ERROR]: #!#!     at ch.njol.skript.lang.TriggerItem.walk(TriggerItem.java:60)
[22:30:17 ERROR]: #!#!     at ch.njol.skript.lang.TriggerItem.walk(TriggerItem.java:88)
[22:30:17 ERROR]: #!#!     at ch.njol.skript.lang.Trigger.execute(Trigger.java:56)
[22:30:17 ERROR]: #!#!     at ch.njol.skript.command.ScriptCommand.execute2(ScriptCommand.java:289)
[22:30:17 ERROR]: #!#!     at ch.njol.skript.command.ScriptCommand.execute(ScriptCommand.java:250)
[22:30:17 ERROR]: #!#!     at ch.njol.skript.command.ScriptCommand.onCommand(ScriptCommand.java:194)
[22:30:17 ERROR]: #!#!     at org.bukkit.command.PluginCommand.execute(PluginCommand.java:44)
[22:30:17 ERROR]: #!#!     at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:141)
[22:30:17 ERROR]: #!#!     at org.bukkit.craftbukkit.v1_12_R1.CraftServer.dispatchCommand(CraftServer.java:648)
[22:30:17 ERROR]: #!#!     at org.bukkit.craftbukkit.v1_12_R1.CraftServer.dispatchServerCommand(CraftServer.java:634)
[22:30:17 ERROR]: #!#!     at net.minecraft.server.v1_12_R1.DedicatedServer.aP(DedicatedServer.java:444)
[22:30:17 ERROR]: #!#!     at net.minecraft.server.v1_12_R1.DedicatedServer.D(DedicatedServer.java:407)
[22:30:17 ERROR]: #!#!     at net.minecraft.server.v1_12_R1.MinecraftServer.C(MinecraftServer.java:679)
[22:30:17 ERROR]: #!#!     at net.minecraft.server.v1_12_R1.MinecraftServer.run(MinecraftServer.java:577)
[22:30:17 ERROR]: #!#!     at java.lang.Thread.run(Thread.java:748)
[22:30:17 ERROR]: #!#!
[22:30:17 ERROR]: #!#! Version Information:
[22:30:17 ERROR]: #!#!   Skript: 2.6-beta3 (latest)
[22:30:17 ERROR]: #!#!     Flavor: skriptlang-github
[22:30:17 ERROR]: #!#!     Date: 14:09:29.995077500
[22:30:17 ERROR]: #!#!   Bukkit: 1.12.2-R0.1-SNAPSHOT
[22:30:17 ERROR]: #!#!   Minecraft: 1.12.2
[22:30:17 ERROR]: #!#!   Java: 1.8.0_292 (OpenJDK 64-Bit Server VM 25.292-b10)
[22:30:17 ERROR]: #!#!   OS: Linux aarch64 5.4.0-1044-raspi
[22:30:17 ERROR]: #!#!
[22:30:17 ERROR]: #!#! Server platform: Spigot
[22:30:17 ERROR]: #!#!
[22:30:17 ERROR]: #!#! Current node: null
[22:30:17 ERROR]: #!#! Current item: connect the player to "Lobby"
[22:30:17 ERROR]: #!#! Current trigger: command /l (simple event) (lobby.sk, line 2)
[22:30:17 ERROR]: #!#!
[22:30:17 ERROR]: #!#! Thread: Server thread
[22:30:17 ERROR]: #!#!
[22:30:17 ERROR]: #!#! Language: english
[22:30:17 ERROR]: #!#! Link parse mode: DISABLED
[22:30:17 ERROR]: #!#!
[22:30:17 ERROR]: #!#! End of Error.

Other

Agreement

  • I have read the guidelines above and confirm I am following them with this report.
@TobyMinceraft
Copy link

You're trying to use Skript 2.6+ on 1.12.
Support for 1.12 is dropped in the latest releases, so you need to use 2.5.3 or lower

@AyhamAl-Ali
Copy link
Member

AyhamAl-Ali commented Oct 6, 2021

You're trying to use Skript 2.6+ on 1.12. Support for 1.12 is dropped in the latest releases, so you need to use 2.5.3 or lower

NOTICE: After a lot of discussion, we have decided to drop support for 1.12 and lower, as it stops us from adding a lot of features and focusing on other parts of Skript. 2.6.x will be the last version working with 1.12 and lower. Security patches and other kind of fixes might be ported to this version, but keep in mind that features won't be added.

That means 2.6 should work with 1.12

The issue is caused by this line returning null and that's probably caused by firstPlayer returning null in this line but only on 1.12.2 because when you try to execute that command and no players are online (from console) on 1.16 that doesn't happen

@TPGamesNL
Copy link
Member

TPGamesNL commented Oct 6, 2021

Should be fixed by changing EffConnect to get the player array before sending the first plugin message, and not continue if it is empty.

Besides that, the sendPluginMessage that gets the first of the online players should fail quicker when there are no players online, and there should be a note in its Javadocs (and all methods in Utils using it) saying the method can only be used when there's a player online.

@blueheaven566 please fill out the format properly next time

@TPGamesNL TPGamesNL added bug An issue that needs to be fixed. Alternatively, a PR fixing an issue. priority: low Issues that are not harmful to the experience but are related to useful changes or additions. labels Oct 6, 2021
@TPGamesNL TPGamesNL changed the title got an erroe NPE for EffConnect Oct 8, 2021
@TPGamesNL TPGamesNL added PR available Issues which have a yet-to-be merged PR resolving it completed The issue has been fully resolved and the change will be in the next Skript update. and removed PR available Issues which have a yet-to-be merged PR resolving it labels Oct 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An issue that needs to be fixed. Alternatively, a PR fixing an issue. completed The issue has been fully resolved and the change will be in the next Skript update. priority: low Issues that are not harmful to the experience but are related to useful changes or additions.
Projects
None yet
Development

No branches or pull requests

5 participants