Advertisement
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

[HELP] Save Data

Comments in 'Plugin Development' started by Primus, Apr 10, 2015.

  1. Primus
    Offline

    Primus Notable Member

    Joined:
    Apr 7, 2015
    Posts:
    1,470
    Minecraft User:
    PrimusLV
    How to save data for example: I wanna put a prefix in nameTag for other player, and on rejoin/reconnect or reload to get it back from .yml file!
  2. Lambo
    Offline

    Lambo Notable Member Plugin Developer

    Joined:
    Sep 14, 2013
    Posts:
    431
    Plugins:
    4
    Minecraft User:
    Lambo
    EvolSoft likes this.
  3. Primus
    Offline

    Primus Notable Member

    Joined:
    Apr 7, 2015
    Posts:
    1,470
    Minecraft User:
    PrimusLV
    Maby can you show any example for position save? Like on teleport save last position.
  4. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,306
    Plugins:
    11
    Minecraft User:
    PEMapModder
    If you save all name tags on one file, it may become very slow. What about creating one txt file for each player and save the prefix into the file directly without any formatting like YAML?
  5. Primus
    Offline

    Primus Notable Member

    Joined:
    Apr 7, 2015
    Posts:
    1,470
    Minecraft User:
    PrimusLV
    hmm... One file for each? How?





    I used this before $this->tag = new Config()
    What is @mkdir and do i need to use it?
  6. EvolSoft
    Offline

    EvolSoft Notable Member Plugin Developer

    Joined:
    Sep 10, 2014
    Posts:
    821
    Plugins:
    15
    Minecraft User:
    Flavius12
    mkdir makes a directory (in your case the plugin directory). You need it because you can't create a file in a directory which doesn't exists
    PEMapModder likes this.
  7. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,306
    Plugins:
    11
    Minecraft User:
    PEMapModder

Share This Page

Advertisement