Advertisement
thevipershowita

main.java

Jul 25th, 2019
618
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.84 KB | None | 0 0
  1. package me.tylercreator.fallensurv;
  2.  
  3. import org.apache.logging.log4j.core.config.plugins.Plugin;
  4. import org.bukkit.Bukkit;
  5. import org.bukkit.configuration.file.FileConfiguration;
  6. import org.bukkit.event.Listener;
  7. import org.bukkit.plugin.java.JavaPlugin;
  8. import me.tylercreator.fallensurv.spawnmodifier.Spawnmodifier;
  9.  
  10. public class main extends JavaPlugin implements Listener{
  11.    
  12.     public static main plugin;
  13.    
  14.    
  15.    
  16.     public static final String RESET = "\u001B[0m"; //must be used after any colors or background color
  17.     public static final String BLACK = "\u001B[30m"; //black text
  18.     public static final String RED = "\u001B[31m"; //red text
  19.     public static final String GREEN = "\u001B[32m"; //green text
  20.     public static final String YELLOW = "\u001B[33m"; //yellow text
  21.     public static final String PURPLE = "\u001B[35m"; //purple text
  22.     public static final String CYAN = "\u001B[36m"; //cyan text
  23.     public static final String WHITE = "\u001B[37m"; //white text
  24.     public static final String BLACK_BACKGROUND = "\u001B[40m"; //black background
  25.     public static final String RED_BACKGROUND = "\u001B[41m"; //red background
  26.     public static final String YELLOW_BACKGROUND = "\u001B[43m"; //yellow background
  27.    
  28.     @Override
  29.     public void onEnable() {
  30.        
  31.         FileConfiguration config = getConfig();
  32.  
  33.         Bukkit.getLogger().info(YELLOW_BACKGROUND + CYAN + "[FallenSurv]" + GREEN + "Plugin enabled correctly!" + RESET);
  34.        
  35.         config.addDefault("minimumTeleport", 250);
  36.         config.addDefault("maximumTeleport", 2500); //should get from config
  37.        
  38.         config.options().copyDefaults(true);
  39.         saveConfig();
  40.        
  41.        
  42.         getServer().getPluginManager().registerEvents(new Spawnmodifier(), this);
  43.        
  44.        
  45.        
  46.            
  47.     }
  48.  
  49.     @Override
  50.     public void onDisable() {
  51.         Bukkit.getLogger().info(YELLOW_BACKGROUND + CYAN + "[FallenSurv]" + GREEN + "Plugin disabled correctly!" + RESET);
  52.        
  53.     }
  54.  
  55. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement