Loading...
Beta Modpages Unclaimed

WhatsUp

Query APIs and run functions based on the results

0 Likes
185 Downloads
Created by lukebemish

Description

WhatsUp

Quilt version requires: QSL and GroovyDuvet

Forge version requires: GML

WhatsUp is a tool for datapacks that allows servers to query a provided web endpoint at a given frequency, and execute functions (the normal .mcfunction type) based on the results returned by that endpoint.

WhatsUp defines both listeners and predicates. listeners are defined at data/[namespace]/whatsup/listeners/[name].json, and take the following structure:

  • endpoint - The URL to be queried by the listener
  • frequency - An integer representing how many seconds should pass between queries of the endpoint
  • actions - A list of actions to do based on the returned result of the endpoint. Each takes the following form:
    • predicate - The resource location of a predicate to check against the endpoint's result
    • function - The resource location of a function to execute if the predicate passes
    • levels - (Optional; defaults to ["overworld"]) A list of dimensions to run the provided function in
    • then - (Optional) a list of locations of other listeners to chain after this listener
    • storage - (Optional) a map of property names to resource locations specifying command data storage that the predicate has access to

Predicates are stored at data/[namespace]/whatsup/predicates/[name].groovy, and are groovy scripts. The groovy environment the predicates run in has access to the context variable, which has the following properties:

  • text - The unprocessed response text
  • json - The a Map of the response parsed as JSON, or null if the response is not a JSON object
  • storage - Contains a property for every command data storage specified in the action; data storages can be queried and mutated.

This context object is also available as the delegate of the script, so a leading context. to access these properties is optional.

An example datapack can be found on the GitHub releases.

The mod also provides the /whatsup command for easily testing datapacks; this can be used to run any listener immediately.


AD Become Premium to remove Ads!

What means Verified?

  • Compatibility: The mod should be compatible with the latest version of Minecraft and be clearly labeled with its supported versions.
  • Functionality: The mod should work as advertised and not cause any game-breaking bugs or crashes.
  • Security: The mod should not contain any malicious code or attempts to steal personal information.
  • Performance: The mod should not cause a significant decrease in the game's performance, such as by causing lag or reducing frame rates.
  • Originality: The mod should be original and not a copy of someone else's work.
  • Up-to-date: The mod should be regularly updated to fix bugs, improve performance, and maintain compatibility with the latest version of Minecraft.
  • Support: The mod should have an active developer who provides support and troubleshooting assistance to users.
  • License: The mod should be released under a clear and open source license that allows others to use, modify, and redistribute the code.
  • Documentation: The mod should come with clear and detailed documentation on how to install and use it.

AD Become Premium to remove Ads!

How to Install

1

Download Forge & Java

Download Forge from the offical Site or here. If you dont have Java installed then install it now from here. After Downloading Forge you can run the file with Java.

2

Prepare

Lounch Minecraft and select your Forge istallation as Version this will create a Folder called Mods.

3

Add Mods

Type Win+R and type %appdata% and open the .minecraft Folder. There will you find your Folder called Mods. Place all Mods you want to play in this Folder

4

Enjoy

You are now Ready. Re-start your Game and start Playing.

More Mods like this

Clumps

Clumps XP orbs together to reduce lag

Morpheus

Sleep vote system

FTB Utilities (Forge)

FTB Utilities is a mod by FTB. It aims to provide several useful utilities within the FTB Platform ranging from friends list, server configuration utilities, world borders, guide system and many other features...

spark

spark is a performance profiler for Minecraft clients, servers and proxies.

Lootr (Forge & NeoForge)

A mod that makes it so nobody misses out on Loot! All loot chests are instanced per player and visually unique.