How to refresh cuboids from DB like /ps pull?
UltraMC opened this issue ยท 9 comments
I want to refresh cuboids.
/ps pull- does it's job but how to call it from external plugin? API dont have it.
Could I do:
import net.sacredlabyrinth.Phaed.PreciousStones.*;
PreciousStones PreciousStones = new PreciousStones();
PreciousStones.getStorageManager().loadWorldData();
PS I've red some of PreciousStones code, you people are badass
Than is it REALLY needed in API?
I need that for refreshing deleted cuboids from outside the plugin intself (i.e. PHP database manipulation).
The core feature needed is:
in config: doPullUpdatesEvery: x seconds
as now it does so only onEnable
Pulling the db down to memory every few secs would be a bad idea performance-wise tho so i would recommend against that
I pull only when control table contains cuboids to delete.
Anyway there should be a cool way of dynamicly reloading cubs
If you delete a cuboid fron the db and you want it to be removed from the world as well then use /ps clean, it will remove any fields from the wirld that are no longer on the db. If you add new fields to the db and you want them to be added to the world, then you use /ps pull, it will pull all fields on tge db to tge world.