SsomarDevSsomarPlugins
I

Item Generator but you can manually claim generated resources and relies on unix time

Example Blocks

Free
(0)
272 downloads501 views

Description

loop activator is optional. it's sole purpose is to refresh the value of the hologram.

Dependencies:
- PlaceholderAPI
- Javascript Expansion

javascript files:

javascript_placeholders.yml
unix_now:
file: unix_now.js
unix_after5days:
file: unix_after5days.js
unix_format:
file: unix_format.js
example:
file: example.js


unix_now.js
function main() {
var x = Math.floor(new Date().getTime() / 1000)
return x+""
} main()


unix_format.js
function main() {
var unixTime = Math.floor(new Date().getTime() / 1000)
var timeDifference = args[0] - unixTime
if (args[1] == "d") {
return Math.floor(timeDifference / (60 * 60 * 24))+"";
} else if (args[1] == "h") {
return Math.floor(timeDifference / 3600) % 24 +"";
} else if (args[1] == "m") {
return Math.floor(timeDifference / 60) % 60+"";
} else if (args[1] == "s") {
return timeDifference % 60+"";
} else {
return "NULL"
}
} main()

Version History

v1.0Latest
Jun 8, 2025
272 downloads
Sign in to leave a review.