PlayerFiles

Description:

  • This plugin is used to store information for offline and online players.
  • It creates a config file for every player that joins the server, which can store values for individual players, offline or online.
  • It is easy to use, see below if you are a developer!

Usage and Info for Developers:

  • You can use this plugin to store information for players, like kills, money etc.
  • For example, ChatColor 2 uses this to store the color for players.
  • The values can still be accessed when the players are offline, which is why it is needed for ChatColor 2.

How to Use in Eclipse:

  • 1. Right click your project in the projects tab.
  • 2. Click 'Properties'.
  • 3. Click 'Java Build Path'.
  • 4. Click 'Add External Jars' on the right hand side.
  • 5. Select the 'PlayerFiles.v1.0.jar' file and click ok.
  • 6. Click 'Apply' and then 'Ok' at the bottom right of the window.
  • 7. Now, to use the utilies, simply create a class, and use the methods! Remember to add the plugin file to your server, and also add PlayerFiles as a dependency of your plugin! To do this, in your plugin.yml, add the line: depend: PlayerFiles to set it as a dependency. Enjoy! Example Methods:
  • FileUtils.getPlayerFile(String playername) - Returns the playerfile for the specified player. Remember, the player must have joined the server!
  • FileUtils.getPlayerFileConfig(String playername) - Returns the config for the file of the specified player. Same applies as above.
  • FileUtils.getPlayerFileConfig("Sulphate").set("kills", 5); - Sets the kills: value in Sulphate's player file to 5.
  • FileUtils.getPlayerFileConfig("Sulphate").getInt("kills"); - Gets the value kills: from Sulphate's player file.
  • Note: I don't use any other IDE's, so if you want to know how to add the file to the Java Build Path, just search it on Google.

If you guys have any questions, post them in the comments below! Accepting any ideas that I could add to it!


Comments

Posts Quoted:
Reply
Clear All Quotes

About This Project

  • Project ID
    95250
  • Created
    Sep 26, 2015
  • Last Released File
    Mar 7, 2016
  • Total Downloads
    1,504
  • License

Categories

Members

Recent Files