{"action":"created","issue":{"url":"https://api.github.com/repos/bensku/Skript/issues/1001","repository_url":"https://api.github.com/repos/bensku/Skript","labels_url":"https://api.github.com/repos/bensku/Skript/issues/1001/labels{/name}","comments_url":"https://api.github.com/repos/bensku/Skript/issues/1001/comments","events_url":"https://api.github.com/repos/bensku/Skript/issues/1001/events","html_url":"https://github.com/bensku/Skript/issues/1001","id":279671910,"number":1001,"title":"java.lang.ClassCastException: ch.njol.skript.util.Timespan cannot be cast to ch.njol.skript.util.Date","user":{"login":"supertassu","id":9721638,"avatar_url":"https://avatars2.githubusercontent.com/u/9721638?v=4","gravatar_id":"","url":"https://api.github.com/users/supertassu","html_url":"https://github.com/supertassu","followers_url":"https://api.github.com/users/supertassu/followers","following_url":"https://api.github.com/users/supertassu/following{/other_user}","gists_url":"https://api.github.com/users/supertassu/gists{/gist_id}","starred_url":"https://api.github.com/users/supertassu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/supertassu/subscriptions","organizations_url":"https://api.github.com/users/supertassu/orgs","repos_url":"https://api.github.com/users/supertassu/repos","events_url":"https://api.github.com/users/supertassu/events{/privacy}","received_events_url":"https://api.github.com/users/supertassu/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2017-12-06T08:51:07Z","updated_at":"2017-12-07T11:39:14Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"# java.lang.ClassCastException: ch.njol.skript.util.Timespan cannot be cast to ch.njol.skript.util.Date\r\n\r\nMy skript is most likely broken, but a nice error message would be nicer that errors in console. :P\r\n\r\n## The Script\r\n```\r\ncommand /restart <timespan=10 minutes>:\r\n    description: Restart the server!\r\n    permission: restart.now\r\n    executable by: players and console\r\n    trigger:\r\n        if {restart.timer} is set:\r\n            send \"&cServer already restarting at %difference between {restart.started} and {restart.difference}%... \"\r\n            stop\r\n\r\n        set {restart.started} to now\r\n        set {restart.difference} to arg 1 \r\n    \r\n        broadcast \"&c*** SERVER RESTARTING AT %difference between {restart.started} and {restart.difference}%!\"\r\n        stop\r\n\r\nevery second:\r\n    if {restart.timer} is set:\r\n        loop all players:\r\n            #show an action bar from \"&cServer restarting at %difference between {restart.started} and {restart.difference}%... \" to loop-player ## Skelett\r\n        if difference between {restart.started} and now is more than {restart.difference}:\r\n            broadcast \"&c*** SERVER RESTARTING NOW!\"\r\n            execute console command \"/stop\"\r\n```\r\n\r\n## Stack Trace\r\n\r\n```\r\n[10:45:15 ERROR]: #!#!\r\n[10:45:15 ERROR]: #!#! [Skript] Severe Error:\r\n[10:45:15 ERROR]: #!#!\r\n[10:45:15 ERROR]: #!#! Something went horribly wrong with Skript.\r\n[10:45:15 ERROR]: #!#! This issue is NOT your fault! You probably can't fix it yourself, either.\r\n[10:45:15 ERROR]: #!#! You should report it at https://github.com/bensku/Skript/issues. Please copy paste this report there (or use paste service).\r\n[10:45:15 ERROR]: #!#! This ensures that your issue is noticed and will be fixed as soon as possible.\r\n[10:45:15 ERROR]: #!#!\r\n[10:45:15 ERROR]: #!#! Stack trace:\r\n[10:45:15 ERROR]: #!#! java.lang.ClassCastException: ch.njol.skript.util.Timespan cannot be cast to ch.njol.skript.util.Date\r\n[10:45:15 ERROR]: #!#!     at ch.njol.skript.classes.data.SkriptClasses$14.difference(SkriptClasses.java:1)\r\n[10:45:15 ERROR]: #!#!     at ch.njol.skript.expressions.ExprDifference.get(ExprDifference.java:139)\r\n[10:45:15 ERROR]: #!#!     at ch.njol.skript.lang.util.SimpleExpression.getArray(SimpleExpression.java:104)\r\n[10:45:15 ERROR]: #!#!     at ch.njol.skript.lang.VariableString.toString(VariableString.java:430)\r\n[10:45:15 ERROR]: #!#!     at ch.njol.skript.lang.VariableString.getArray(VariableString.java:594)\r\n[10:45:15 ERROR]: #!#!     at ch.njol.skript.lang.VariableString.getArray(VariableString.java:1)\r\n[10:45:15 ERROR]: #!#!     at ch.njol.skript.effects.EffBroadcast.execute(EffBroadcast.java:67)\r\n[10:45:15 ERROR]: #!#!     at ch.njol.skript.lang.Effect.run(Effect.java:52)\r\n[10:45:15 ERROR]: #!#!     at ch.njol.skript.lang.TriggerItem.walk(TriggerItem.java:61)\r\n[10:45:15 ERROR]: #!#!     at ch.njol.skript.lang.TriggerItem.walk(TriggerItem.java:89)\r\n[10:45:15 ERROR]: #!#!     at ch.njol.skript.lang.Trigger.execute(Trigger.java:55)\r\n[10:45:15 ERROR]: #!#!     at ch.njol.skript.command.ScriptCommand.execute2(ScriptCommand.java:220)\r\n[10:45:15 ERROR]: #!#!     at ch.njol.skript.command.ScriptCommand.execute(ScriptCommand.java:182)\r\n[10:45:15 ERROR]: #!#!     at ch.njol.skript.command.Commands.handleCommand(Commands.java:269)\r\n[10:45:15 ERROR]: #!#!     at ch.njol.skript.command.Commands$1.onPlayerCommand(Commands.java:164)\r\n[10:45:15 ERROR]: #!#!     at com.destroystokyo.paper.event.executor.MethodHandleEventExecutor.execute(MethodHandleEventExecutor.java:35)\r\n[10:45:15 ERROR]: #!#!     at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:78)\r\n[10:45:15 ERROR]: #!#!     at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62)\r\n[10:45:15 ERROR]: #!#!     at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:515)\r\n[10:45:15 ERROR]: #!#!     at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:500)\r\n[10:45:15 ERROR]: #!#!     at net.minecraft.server.v1_12_R1.PlayerConnection.handleCommand(PlayerConnection.java:1463)\r\n[10:45:15 ERROR]: #!#!     at net.minecraft.server.v1_12_R1.PlayerConnection.a(PlayerConnection.java:1276)\r\n[10:45:15 ERROR]: #!#!     at net.minecraft.server.v1_12_R1.PacketPlayInChat.a(PacketPlayInChat.java:45)\r\n[10:45:15 ERROR]: #!#!     at net.minecraft.server.v1_12_R1.PacketPlayInChat.a(PacketPlayInChat.java:5)\r\n[10:45:15 ERROR]: #!#!     at net.minecraft.server.v1_12_R1.PlayerConnectionUtils.lambda$ensureMainThread$0(PlayerConnectionUtils.java:14)\r\n[10:45:15 ERROR]: #!#!     at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)\r\n[10:45:15 ERROR]: #!#!     at java.util.concurrent.FutureTask.run(FutureTask.java:266)\r\n[10:45:15 ERROR]: #!#!     at net.minecraft.server.v1_12_R1.SystemUtils.a(SourceFile:46)\r\n[10:45:15 ERROR]: #!#!     at net.minecraft.server.v1_12_R1.MinecraftServer.D(MinecraftServer.java:843)\r\n[10:45:15 ERROR]: #!#!     at net.minecraft.server.v1_12_R1.DedicatedServer.D(DedicatedServer.java:426)\r\n[10:45:15 ERROR]: #!#!     at net.minecraft.server.v1_12_R1.MinecraftServer.C(MinecraftServer.java:767)\r\n[10:45:15 ERROR]: #!#!     at net.minecraft.server.v1_12_R1.MinecraftServer.run(MinecraftServer.java:665)\r\n[10:45:15 ERROR]: #!#!     at java.lang.Thread.run(Thread.java:748)\r\n[10:45:15 ERROR]: #!#!\r\n[10:45:15 ERROR]: #!#! Version Information:\r\n[10:45:15 ERROR]: #!#!   Skript: 2.2-dev32c (latest)\r\n[10:45:15 ERROR]: #!#!   Bukkit: 1.12.2-R0.1-SNAPSHOT\r\n[10:45:15 ERROR]: #!#!   Minecraft: 1.12.2\r\n[10:45:15 ERROR]: #!#!   Java: 1.8.0_151 (OpenJDK 64-Bit Server VM 25.151-b12)\r\n[10:45:15 ERROR]: #!#!   OS: Linux amd64 4.4.0-98-generic\r\n[10:45:15 ERROR]: #!#!\r\n[10:45:15 ERROR]: #!#! Running CraftBukkit: false\r\n[10:45:15 ERROR]: #!#! Running Spigot (or compatible): true\r\n[10:45:15 ERROR]: #!#! Running Paper (or compatible): true\r\n[10:45:15 ERROR]: #!#!\r\n[10:45:15 ERROR]: #!#! Current node: null\r\n[10:45:15 ERROR]: #!#! Current item: broadcast \"*** SERVER RESTARTING AT %difference between {restart.started}(as java.lang.Object) and {restart.difference}(as java.lang.Object)%!\"\r\n[10:45:15 ERROR]: #!#! Thread: Server thread\r\n[10:45:15 ERROR]: #!#!\r\n[10:45:15 ERROR]: #!#! Language: english\r\n[10:45:15 ERROR]: #!#! Link parse mode: DISABLED\r\n[10:45:15 ERROR]: #!#!\r\n[10:45:15 ERROR]: #!#! End of Error.\r\n[10:45:15 ERROR]: #!#!\r\n```\r\n\r\n## Versions\r\n\r\n```\r\n> pl\r\n[10:49:45 INFO]: Plugins (22): AdvancedAchievements, BungeeTabListPlus, CoreProtect, DynamicSigns, dynmap, Essentials, EssentialsChat, FastAsyncVoxelSniper, FastAsyncWorldEdit, FeatherBoard, LuckPerms, mcMMO, MVdWPlaceholderAPI, PacketListenerApi, PlaceholderAPI, Skript, StaffPlus, Vault, VoxelSniper, WorldBorder, WorldEdit, WorldGuard\r\n> ver\r\n[10:50:11 INFO]: This server is running Paper version git-Paper-1268 (MC: 1.12.2) (Implementing API version 1.12.2-R0.1-SNAPSHOT)\r\n[10:50:11 INFO]: Checking version, please wait...\r\n[10:50:11 INFO]: You are 1 version(s) behind\r\n> ver Skript\r\n[10:50:27 INFO]: Skript version 2.2-dev32c\r\n[10:50:27 INFO]: Customize Minecraft's mechanics with simple scripts written in plain English sentences.\r\n[10:50:27 INFO]: Website: https://bensku.github.io/Skript\r\n[10:50:27 INFO]: Authors: Njol, Mirreski, bensku, TheBentoBox, tim740, Tuke-Nuke, TheLimeGlass, xXAndrew28Xx, Sashie, RoyCurtis, nfell2009, Syst3ms and Snow-Pyon\r\n```\r\n\r\nLet me know if you need any more information."},"comment":{"url":"https://api.github.com/repos/bensku/Skript/issues/comments/349942937","html_url":"https://github.com/bensku/Skript/issues/1001#issuecomment-349942937","issue_url":"https://api.github.com/repos/bensku/Skript/issues/1001","id":349942937,"user":{"login":"bensku","id":4330456,"avatar_url":"https://avatars3.githubusercontent.com/u/4330456?v=4","gravatar_id":"","url":"https://api.github.com/users/bensku","html_url":"https://github.com/bensku","followers_url":"https://api.github.com/users/bensku/followers","following_url":"https://api.github.com/users/bensku/following{/other_user}","gists_url":"https://api.github.com/users/bensku/gists{/gist_id}","starred_url":"https://api.github.com/users/bensku/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bensku/subscriptions","organizations_url":"https://api.github.com/users/bensku/orgs","repos_url":"https://api.github.com/users/bensku/repos","events_url":"https://api.github.com/users/bensku/events{/privacy}","received_events_url":"https://api.github.com/users/bensku/received_events","type":"User","site_admin":false},"created_at":"2017-12-07T11:39:14Z","updated_at":"2017-12-07T11:39:14Z","author_association":"OWNER","body":"Well, silent failures are bad but this is worse."}}
{"actor":{"display_login":"bensku"}}