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

Fix ExprRespawnLocation expecting a Number #2602

Closed
wants to merge 1 commit into from
Closed

Fix ExprRespawnLocation expecting a Number #2602

wants to merge 1 commit into from

Conversation

bluelhf
Copy link
Contributor

@bluelhf bluelhf commented Oct 27, 2019

Description

In beta9, ExprRespawnLocation's acceptChange method returns CollectionUtils.array(Number.class) even though the expression itself is a location.
img


Target Minecraft Versions: Any
Requirements: None
Related Issues: None (as far as I know)

ExprSpawnLocation used to be a number, this commit makes it a Location instead.
@bluelhf bluelhf changed the title Fix ExprSpawnLocation expecting a Number Fix ExprRespawnLocation expecting a Number Oct 27, 2019
@Wealthyturtle Wealthyturtle added the bug An issue that needs to be fixed. Alternatively, a PR fixing an issue. label Oct 28, 2019
@Wealthyturtle
Copy link
Member

Not sure why it was returning a Number in the first place lol

@bluelhf
Copy link
Contributor Author

bluelhf commented Oct 28, 2019

Not sure why it was returning a Number in the first place lol

Me neither, seems to have even existed in LimeGlass' initial commit, as seen here.

@bluelhf
Copy link
Contributor Author

bluelhf commented Nov 1, 2019

I noticed a strange bug with my own build of Skript with this change in it-
When reloading a script in a subfolder, a severe error is given.
This error doesn't occur when running /sk reload scripts

Has anyone seen this before? Do you think this change is causing the issue?

@Wealthyturtle
Copy link
Member

[14:51:26 ERROR]: #!#! Stack trace:
[14:51:26 ERROR]: #!#! java.lang.IllegalArgumentException: 'other' is different type of Path
[14:51:26 ERROR]: #!#! at sun.nio.fs.UnixPath.relativize(UnixPath.java:416)
[14:51:26 ERROR]: #!#! at sun.nio.fs.UnixPath.relativize(UnixPath.java:43)
[14:51:26 ERROR]: #!#! at ch.njol.skript.ScriptLoader.unloadScript(ScriptLoader.java:952)
[14:51:26 ERROR]: #!#! at ch.njol.skript.SkriptCommand.onCommand(SkriptCommand.java:190)
[14:51:26 ERROR]: #!#! at org.bukkit.command.PluginCommand.execute(PluginCommand.java:45)
[14:51:26 ERROR]: #!#! at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:159)
[14:51:26 ERROR]: #!#! at org.bukkit.craftbukkit.v1_14_R1.CraftServer.dispatchCommand(CraftServer.java:739)
[14:51:26 ERROR]: #!#! at net.minecraft.server.v1_14_R1.PlayerConnection.handleCommand(PlayerConnection.java:1800)
[14:51:26 ERROR]: #!#! at net.minecraft.server.v1_14_R1.PlayerConnection.a(PlayerConnection.java:1608)
[14:51:26 ERROR]: #!#! at net.minecraft.server.v1_14_R1.PacketPlayInChat.a(PacketPlayInChat.java:47)
[14:51:26 ERROR]: #!#! at net.minecraft.server.v1_14_R1.PacketPlayInChat.a(PacketPlayInChat.java:5)
[14:51:26 ERROR]: #!#! at net.minecraft.server.v1_14_R1.PlayerConnectionUtils.lambda$ensureMainThread$0(PlayerConnectionUtils.java:23)
[14:51:26 ERROR]: #!#! at net.minecraft.server.v1_14_R1.TickTask.run(SourceFile:18)
[14:51:26 ERROR]: #!#! at net.minecraft.server.v1_14_R1.IAsyncTaskHandler.executeTask(IAsyncTaskHandler.java:136)
[14:51:26 ERROR]: #!#! at net.minecraft.server.v1_14_R1.IAsyncTaskHandlerReentrant.executeTask(SourceFile:23)
[14:51:26 ERROR]: #!#! at net.minecraft.server.v1_14_R1.IAsyncTaskHandler.executeNext(IAsyncTaskHandler.java:109)
[14:51:26 ERROR]: #!#! at net.minecraft.server.v1_14_R1.MinecraftServer.aX(MinecraftServer.java:1029)
[14:51:26 ERROR]: #!#! at net.minecraft.server.v1_14_R1.MinecraftServer.executeNext(MinecraftServer.java:1022)
[14:51:26 ERROR]: #!#! at net.minecraft.server.v1_14_R1.IAsyncTaskHandler.awaitTasks(IAsyncTaskHandler.java:119)
[14:51:26 ERROR]: #!#! at net.minecraft.server.v1_14_R1.MinecraftServer.sleepForTick(MinecraftServer.java:1006)
[14:51:26 ERROR]: #!#! at net.minecraft.server.v1_14_R1.MinecraftServer.run(MinecraftServer.java:929)
[14:51:26 ERROR]: #!#! at java.lang.Thread.run(Thread.java:748)

For reference - in future please don't use hastebin as it does not provide permanent storage.

@Wealthyturtle
Copy link
Member

I don't think that exception thrown has anything to do with this change - since a change in the return value of a function of ExprRespawnLocation should not have any impact on the unloadScript function...

@bluelhf
Copy link
Contributor Author

bluelhf commented Nov 1, 2019

I don't think that exception thrown has anything to do with this change - since a change in the return value of a function of ExprRespawnLocation should not have any impact on the unloadScript function...

Alright, then I guess that's not to be discussed here.

For reference - in future please don't use hastebin as it does not provide permanent storage.

Ah, sorry, was unsure whether it did or not.

@bensku bensku changed the base branch from master to 2.4 November 3, 2019 19:10
@bensku bensku changed the base branch from 2.4 to master November 3, 2019 19:11
@bensku
Copy link
Member

bensku commented Nov 3, 2019

Manually merged to 2.4 branch.

@bensku bensku closed this Nov 3, 2019
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants