Exception: Access denied. Path must be within 'umod' directory
if (!Files.Exists("Rewards"))
    Files.WriteObject("Rewards", RewardsData.DefaultRewards());

What is Files provided by? The error means you'd need to specify a path under the umod directory.

You likely need to specify either a file extension or append a file with Rewards/ as the prefix.

So is the path not already pointing to umod, im not sure i understand, adding .json results in the same error.

2:33 AM [Error] Failed to call hook 'Loaded' on plugin 'Voter v0.0.1' (Exception: Access denied. Path must be within 'umod' directory! File: Voter\Sites.json)​


            if (!Files.Exists("Sites.json"))
                Files.WriteObject("Sites.json", RewardsData.DefaultRewards());


I'm not really familiar with that API yet, so I'm only assuming. I'd need to take a look at it when I get a chance, but it sounds like it is defaulting to somewhere it shouldn't be. For now, you can try setting the full path from your server root, which would likely be umod/data/filename.