SHARE
TWEET

Untitled

a guest Aug 23rd, 2019 80 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import org.bukkit.ChatColor;
  2. import org.bukkit.configuration.file.FileConfiguration;
  3. import org.bukkit.entity.Player;
  4. import org.bukkit.event.EventHandler;
  5. import org.bukkit.event.Listener;
  6. import org.bukkit.event.player.PlayerJoinEvent;
  7.  
  8. import core.rpg.RPG;
  9.  
  10. public class SoulsCreate implements Listener{
  11.  
  12.     private RPG plugin;
  13.  
  14.     public SoulsCreate(RPG plugin) {
  15.         this.plugin = plugin;
  16.     }
  17.  
  18.     @EventHandler
  19.     public void test(PlayerJoinEvent e) {
  20.         FileConfiguration players = plugin.getPlayers();
  21.         Player p = e.getPlayer();
  22.         if(players.contains("Test."+p.getUniqueId()+".test")){
  23.             plugin.savePlayers();
  24.             p.sendMessage(ChatColor.translateAlternateColorCodes('&', plugin.name+"&bYa estas en la config"));
  25.             return;
  26.         }else {
  27.             players.set("Test."+p.getUniqueId()+".test", 0);
  28.             plugin.savePlayers();
  29.             p.sendMessage(ChatColor.translateAlternateColorCodes('&', plugin.name+"&bTe acabas de registrar en la config"));
  30.             return;
  31.         }
  32.     }
  33. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top