SkriptLang / Skript

Skript is a Spigot plugin which allows server admins to customize their server easily, but without the hassle of programming a plugin or asking/paying someone to program a plugin for them.
https://docs.skriptlang.org
GNU General Public License v3.0
1.03k stars 361 forks source link

Regions are not Serializable #6539

Open DaanProrex opened 3 months ago

DaanProrex commented 3 months ago

Skript/Server Version

[07:13:54 INFO]: [Skript] Skript's aliases can be found here: https://github.com/SkriptLang/skript-aliases
[07:13:54 INFO]: [Skript] Skript's documentation can be found here: https://docs.skriptlang.org/
[07:13:54 INFO]: [Skript] Skript's tutorials can be found here: https://docs.skriptlang.org/tutorials
[07:13:54 INFO]: [Skript] Server Version: git-Paper-463 (MC: 1.20.4)
[07:13:54 INFO]: [Skript] Skript Version: 2.8.4 (skriptlang-github)
[07:13:54 INFO]: [Skript] Installed Skript Addons: None
[07:13:54 INFO]: [Skript] Installed dependencies: 
[07:13:54 INFO]: [Skript]  - Vault v1.7.3-b131
[07:13:54 INFO]: [Skript]  - WorldGuard v7.0.9+5934e49

Bug Description

[07:10:04 ERROR]: #!#! 
[07:10:04 ERROR]: #!#! [Skript] Severe Error:
[07:10:04 ERROR]: #!#! Error saving variable named plot-ownmss
[07:10:04 ERROR]: #!#! 
[07:10:04 ERROR]: #!#! Something went horribly wrong with Skript.
[07:10:04 ERROR]: #!#! This issue is NOT your fault! You probably can't fix it yourself, either.
[07:10:04 ERROR]: #!#! You should report it at https://github.com/SkriptLang/Skript/issues. Please copy paste this report there (or use paste service).
[07:10:04 ERROR]: #!#! This ensures that your issue is noticed and will be fixed as soon as possible.
[07:10:04 ERROR]: #!#! 
[07:10:04 ERROR]: #!#! Stack trace:
[07:10:04 ERROR]: #!#! ch.njol.skript.SkriptAPIException: Serializer of region must override newInstance(), canBeInstantiated() or mustSyncDeserialization() if its class does not have a nullary constructor
[07:10:04 ERROR]: #!#!     at Skript(5).jar//ch.njol.skript.classes.Serializer.newInstance(Serializer.java:79)
[07:10:04 ERROR]: #!#!     at Skript(5).jar//ch.njol.yggdrasil.Yggdrasil.newInstance(Yggdrasil.java:304)
[07:10:04 ERROR]: #!#!     at Skript(5).jar//ch.njol.yggdrasil.Yggdrasil.isSerializable(Yggdrasil.java:139)
[07:10:04 ERROR]: #!#!     at Skript(5).jar//ch.njol.yggdrasil.YggdrasilOutputStream.writeGenericObject(YggdrasilOutputStream.java:153)
[07:10:04 ERROR]: #!#!     at Skript(5).jar//ch.njol.yggdrasil.YggdrasilOutputStream.writeObject(YggdrasilOutputStream.java:227)
[07:10:04 ERROR]: #!#!     at Skript(5).jar//ch.njol.skript.registrations.Classes.serialize(Classes.java:761)
[07:10:04 ERROR]: #!#!     at Skript(5).jar//ch.njol.skript.variables.Variables.serialize(Variables.java:812)
[07:10:04 ERROR]: #!#!     at Skript(5).jar//ch.njol.skript.variables.Variables.serialize(Variables.java:793)
[07:10:04 ERROR]: #!#!     at Skript(5).jar//ch.njol.skript.variables.Variables.saveVariableChange(Variables.java:822)
[07:10:04 ERROR]: #!#!     at Skript(5).jar//ch.njol.skript.variables.Variables.setVariable(Variables.java:543)
[07:10:04 ERROR]: #!#!     at Skript(5).jar//ch.njol.skript.variables.Variables.setVariable(Variables.java:526)
[07:10:04 ERROR]: #!#!     at Skript(5).jar//ch.njol.skript.lang.Variable.set(Variable.java:494)
[07:10:04 ERROR]: #!#!     at Skript(5).jar//ch.njol.skript.lang.Variable.change(Variable.java:550)
[07:10:04 ERROR]: #!#!     at Skript(5).jar//ch.njol.skript.effects.EffChange.execute(EffChange.java:292)
[07:10:04 ERROR]: #!#!     at Skript(5).jar//ch.njol.skript.lang.Effect.run(Effect.java:49)
[07:10:04 ERROR]: #!#!     at Skript(5).jar//ch.njol.skript.lang.TriggerItem.walk(TriggerItem.java:61)
[07:10:04 ERROR]: #!#!     at Skript(5).jar//ch.njol.skript.lang.TriggerItem.walk(TriggerItem.java:88)
[07:10:04 ERROR]: #!#!     at Skript(5).jar//ch.njol.skript.lang.Trigger.execute(Trigger.java:52)
[07:10:04 ERROR]: #!#!     at Skript(5).jar//ch.njol.skript.command.ScriptCommand.execute2(ScriptCommand.java:316)
[07:10:04 ERROR]: #!#!     at Skript(5).jar//ch.njol.skript.command.ScriptCommand.lambda$execute$0(ScriptCommand.java:275)
[07:10:04 ERROR]: #!#!     at Skript(5).jar//ch.njol.skript.command.ScriptCommand.execute(ScriptCommand.java:286)
[07:10:04 ERROR]: #!#!     at Skript(5).jar//ch.njol.skript.command.ScriptCommand.onCommand(ScriptCommand.java:221)
[07:10:04 ERROR]: #!#!     at org.bukkit.command.PluginCommand.execute(PluginCommand.java:45)
[07:10:04 ERROR]: #!#!     at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:155)
[07:10:04 ERROR]: #!#!     at org.bukkit.craftbukkit.v1_20_R3.CraftServer.dispatchCommand(CraftServer.java:999)
[07:10:04 ERROR]: #!#!     at org.bukkit.craftbukkit.v1_20_R3.command.BukkitCommandWrapper.run(BukkitCommandWrapper.java:64)
[07:10:04 ERROR]: #!#!     at com.mojang.brigadier.context.ContextChain.runExecutable(ContextChain.java:73)
[07:10:04 ERROR]: #!#!     at net.minecraft.commands.execution.tasks.ExecuteCommand.a(ExecuteCommand.java:32)
[07:10:04 ERROR]: #!#!     at net.minecraft.commands.execution.tasks.ExecuteCommand.execute(ExecuteCommand.java:19)
[07:10:04 ERROR]: #!#!     at net.minecraft.commands.execution.UnboundEntryAction.a(UnboundEntryAction.java:8)
[07:10:04 ERROR]: #!#!     at net.minecraft.commands.execution.CommandQueueEntry.a(CommandQueueEntry.java:5)
[07:10:04 ERROR]: #!#!     at net.minecraft.commands.execution.ExecutionContext.a(ExecutionContext.java:101)
[07:10:04 ERROR]: #!#!     at net.minecraft.commands.CommandDispatcher.a(CommandDispatcher.java:434)
[07:10:04 ERROR]: #!#!     at net.minecraft.commands.CommandDispatcher.performCommand(CommandDispatcher.java:336)
[07:10:04 ERROR]: #!#!     at net.minecraft.commands.CommandDispatcher.a(CommandDispatcher.java:323)
[07:10:04 ERROR]: #!#!     at net.minecraft.server.network.PlayerConnection.a(PlayerConnection.java:2230)
[07:10:04 ERROR]: #!#!     at net.minecraft.server.network.PlayerConnection.lambda$handleChatCommand$14(PlayerConnection.java:2190)
[07:10:04 ERROR]: #!#!     at net.minecraft.util.thread.IAsyncTaskHandler.b(IAsyncTaskHandler.java:59)
[07:10:04 ERROR]: #!#!     at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1768)
[07:10:04 ERROR]: #!#!     at net.minecraft.server.TickTask.run(TickTask.java:18)
[07:10:04 ERROR]: #!#!     at net.minecraft.util.thread.IAsyncTaskHandler.d(IAsyncTaskHandler.java:153)
[07:10:04 ERROR]: #!#!     at net.minecraft.util.thread.IAsyncTaskHandlerReentrant.d(IAsyncTaskHandlerReentrant.java:24)
[07:10:04 ERROR]: #!#!     at net.minecraft.server.MinecraftServer.b(MinecraftServer.java:1465)
[07:10:04 ERROR]: #!#!     at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:194)
[07:10:04 ERROR]: #!#!     at net.minecraft.util.thread.IAsyncTaskHandler.x(IAsyncTaskHandler.java:126)
[07:10:04 ERROR]: #!#!     at net.minecraft.server.MinecraftServer.bl(MinecraftServer.java:1442)
[07:10:04 ERROR]: #!#!     at net.minecraft.server.MinecraftServer.x(MinecraftServer.java:1365)
[07:10:04 ERROR]: #!#!     at net.minecraft.util.thread.IAsyncTaskHandler.c(IAsyncTaskHandler.java:136)
[07:10:04 ERROR]: #!#!     at net.minecraft.server.MinecraftServer.w_(MinecraftServer.java:1343)
[07:10:04 ERROR]: #!#!     at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:1232)
[07:10:04 ERROR]: #!#!     at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:319)
[07:10:04 ERROR]: #!#!     at java.base/java.lang.Thread.run(Thread.java:840)
[07:10:04 ERROR]: #!#! 
[07:10:04 ERROR]: #!#! Version Information:
[07:10:04 ERROR]: #!#!   Skript: 2.8.4 (latest)
[07:10:04 ERROR]: #!#!     Flavor: skriptlang-github
[07:10:04 ERROR]: #!#!     Date: 11:03:52.948789700
[07:10:04 ERROR]: #!#!   Bukkit: 1.20.4-R0.1-SNAPSHOT
[07:10:04 ERROR]: #!#!   Minecraft: 1.20.4
[07:10:04 ERROR]: #!#!   Java: 17.0.10 (OpenJDK 64-Bit Server VM 17.0.10+7)
[07:10:04 ERROR]: #!#!   OS: Linux amd64 6.2.0-39-generic
[07:10:04 ERROR]: #!#! 
[07:10:04 ERROR]: #!#! Server platform: Paper
[07:10:04 ERROR]: #!#! 
[07:10:04 ERROR]: #!#! Current node: null
[07:10:04 ERROR]: #!#! Current item: null
[07:10:04 ERROR]: #!#! 
[07:10:04 ERROR]: #!#! Thread: Server thread
[07:10:04 ERROR]: #!#! 
[07:10:04 ERROR]: #!#! Language: english
[07:10:04 ERROR]: #!#! Link parse mode: DISABLED
[07:10:04 ERROR]: #!#! 
[07:10:04 ERROR]: #!#! End of Error.
[07:10:04 ERROR]: #!#!

Expected Behavior

a variable must be sent to the player

Steps to Reproduce

This is the code where i get the error This is the code where I get the error when I do /ownerlist

command /addowner:
    trigger:
        set {_uuid} to uuid of {_p}
        wait 1 tick
        add region at player to {plot-owner-%{_uuid}%::*}

command /ownerlist:
    trigger:
        set {_uuid} to uuid of {_p}
        set {plot-ownmss} to {plot-owner-%{_uuid}%::1}
        wait 1 tick
        send "%{_plot}% ownss"
        wait 1 tick
        send "%{plot-owner-%{_uuid}%::*}%"

Errors or Screenshots

No response

Other

No response

Agreement

sovdeeth commented 3 months ago

duplicate of https://github.com/SkriptLang/skript-worldguard/issues/9, though since we don't really have any timeline for removing world guard support from skript, perhaps this should be fixed here. Opinions welcome.

AyhamAl-Ali commented 3 months ago

duplicate of SkriptLang/skript-worldguard#9, though since we don't really have any timeline for removing world guard support from skript, perhaps this should be fixed here. Opinions welcome.

I agree, we can fix it here in the meantime