Guest User

Event

a guest
Apr 3rd, 2013
14
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.97 KB | None | 0 0
  1. package me.kyle.burnett.hungergames.listener;
  2.  
  3. import me.kyle.burnett.hungergames.Main;
  4.  
  5. import org.bukkit.entity.Player;
  6. import org.bukkit.event.EventHandler;
  7. import org.bukkit.event.player.PlayerJoinEvent;
  8.  
  9.  
  10. public class JoinEvent implements org.bukkit.event.Listener{
  11.  
  12.     public static Main plugin;
  13.     public JoinEvent(Main instance){
  14.         plugin = instance;
  15.     }
  16.    
  17.     @EventHandler
  18.     public void playerJoin(PlayerJoinEvent e){
  19.         Player p = e.getPlayer();
  20.                
  21.         if(Main.userConfig.contains(p.getName())){
  22.             return;
  23.         }else if(!Main.userConfig.contains(p.getName())){
  24.             Main.userConfig.createSection(p.getName() +  ".Arena");
  25.             Main.userConfig.createSection(p.getName() + ".Rank");
  26.             Main.userConfig.createSection(p.getName() + ".Class");
  27.             Main.userConfig.createSection(p.getName() + ".Kill's");
  28.             Main.userConfig.createSection(p.getName() + ".Death's");
  29.             Main.userConfig.createSection(p.getName() + ".Kill/Death-Ratio");
  30.             Main.saveUserConfig();
  31.        
  32.         }
  33.     }
  34. }
Advertisement
Add Comment
Please, Sign In to add comment