de en es fr
Let the machine help
Light teasing, exhibition, BDSM, sissyfication, watersports... with sounds and pictures


Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Resource pack check
PostPosted: Sun Mar 28, 2021 12:44 am 
Offline
Regular
Hey,

What’s the best way to do a check to confirm all resource packs have been downloaded at the start of a script.

Can I do a check to confirm a specific image folder exists and return true?

Or can I check for an specific image in that folder?

Thanks,
Steve


Top
 Profile Send private message 
 
 Re: Resource pack check
PostPosted: Tue Apr 13, 2021 12:09 pm 
Offline
Site Admin
User avatar
Yes, you can simply check that a file exists
Code:
def datadir = getDataFolder();
if(!new File(dir+"/images/myscript/x.jpeg").exists()) {
// problem
}


Top
 Profile Send private message 
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  


Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Maroon Fusion theme created by Oxydo
Software, theme modifications, phpBB modification by Doti 2010 - 2020
This website uses session cookies only.