SsomarDevSsomarPlugins
C

Custom Crop Growth System Template

Example Blocks

Free
(0)
297 downloads530 views

Description

Dependencies:
- PlaceholderAPI
- Javascript Expansion
- Math Expansion

javascript_placeholders.yml goes to plugins/PlaceholderAPI/
the rest except the eb file goes to the plugins/PlaceholderAPI/javascripts/ folder

i cant upload the js files so ill just paste the relevant stuff here
unix_now.js
function main() {
var x = Math.floor(new Date().getTime() / 1000)
return x+""
} main()

unix_after5days.js
function main() {
var x = Math.floor(new Date().getTime() / 1000)
var futureTime = x + 5 * 24 * 60 * 60; // Add 5 days in seconds
return futureTime + "";

} 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
Mar 9, 2025
297 downloads
Sign in to leave a review.