Class Resources

java.lang.Object
studio.magemonkey.codex.mccore.config.Resources

public class Resources extends Object

A utility class for copying resource files to the server directory.

  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    copy(org.bukkit.plugin.Plugin plugin, String resource)
    Copies a resource to the plugin's data folder using the same file name as the resource.
    static void
    copy(org.bukkit.plugin.Plugin plugin, String resource, boolean overwrite)
    Copies a resource to the plugin's data folder using the same file name as the resource.
    static void
    copy(org.bukkit.plugin.Plugin plugin, String resource, String destination)
    Copies a resource to the plugin's data folder using the provided destination to save to.
    static void
    copy(org.bukkit.plugin.Plugin plugin, String resource, String destination, boolean overwrite)
    Copies a resource to the plugin's data folder using the provided destination to save to.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Resources

      public Resources()
  • Method Details

    • copy

      public static void copy(org.bukkit.plugin.Plugin plugin, String resource)

      Copies a resource to the plugin's data folder using the same file name as the resource. If the file already exists it will be overwritten.

      Parameters:
      plugin - plugin reference
      resource - resource to copy
    • copy

      public static void copy(org.bukkit.plugin.Plugin plugin, String resource, boolean overwrite)

      Copies a resource to the plugin's data folder using the same file name as the resource.

      Parameters:
      plugin - plugin reference
      resource - resource to copy
      overwrite - whether or not to overwrite existing files
    • copy

      public static void copy(org.bukkit.plugin.Plugin plugin, String resource, String destination)

      Copies a resource to the plugin's data folder using the provided destination to save to. If the file already exists it will be overwritten.

      Parameters:
      plugin - plugin reference
      resource - resource to copy
      destination - destination to save the file to
    • copy

      public static void copy(org.bukkit.plugin.Plugin plugin, String resource, String destination, boolean overwrite)

      Copies a resource to the plugin's data folder using the provided destination to save to.

      Parameters:
      plugin - plugin reference
      resource - resource to copy
      destination - destination to save the file to
      overwrite - whether or not to overwrite existing files