A few questions

Discussion in 'Resources' started by DrAgonmoray, May 21, 2011.

Thread Status:
Not open for further replies.
  1. Offline

    DrAgonmoray

    Hi- I have a few questions (obviously)
    The first one is, how do I save data for plugins? For example, I want to save a tiny bit of data (either a string or a few ints, haven't decided) and have it be able to be loaded again when a server stops and is started back up.

    Is there a certain event to detect when the server time is changed? I would like to fire a function every time it changes.

    Any help would be appreciated. :)
     
  2. Offline

    nickguletskii

    First of all, it all depends on your data type.
    If you need to save a single string, do it like you normally do - for example, use BufferedWriter/Reader.
    If you need to save some properties, use the Properties class.
    If you need to save a collection, use SnakeYML that comes with CraftBukkit.
    If you need to save a serializable object that doesn't fit into other categories, use ObjectOutput/InputStream.
     
  3. Offline

    Tagette

    That template has Property files, Language Files, and SQLite Database. One of those should work fine for you. :)
    Click! <- Click That
     
Thread Status:
Not open for further replies.

Share This Page