Skript Event Help

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

WatchBOT

New Member
Sep 4, 2017
7
0
0
26
Skript Version: Latest
Minecraft Version: 1.9.2

---
Is there an event that detects a time change, and what addons adds this?
 
Skript Version: Latest
Minecraft Version: 1.9.2

---
Is there an event that detects a time change, and what addons adds this?
Well in vanilla skript there's periodical events - every <timespan>
Code:
every 10 minutes:
    #do something
not sure if thats what youre looking for or what
 
Well in vanilla skript there's periodical events - every <timespan>
Code:
every 10 minutes:
    #do something
not sure if thats what youre looking for or what
I wouldn't recommend them, periodical events are known to be laggy and shouldn't be used. It's better to do a while loop on the skript load event.
 
Well in the world I currently want to create my skript I have the gamerule DoDaylightCycle turned off. Therefor I wanted to create skript which could detect whenever someone executed a time changing command and cancel it:
code_language.skript:
On Time Change:
       cancel event
 
code_language.skript:
on command "/time":
    cancel event# im not sure if this works else
    make console execute command "/time set 0"
    send "Nah dude! Stap!"
 
  • Like
Reactions: WatchBOT
cancel event# im not sure if this works else
it does. You can also cancel all commands if you don't specify a command on the event.

The problem with your code is that it only disables a command, if the time changes by other means this code won't disallow it.

You can apply the code to every command that changes time but that's tedious if there are a bunch. Anyway, that's probably the best guess.

Using packets perhaps, disable the sending of that packet for example?
 
  • Like
Reactions: WatchBOT
Status
Not open for further replies.