Guest User

MineSHOP Lite v1.96 API Example

a guest
Jul 7th, 2017
1,083
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.81 KB | None | 0 0
  1. /*
  2. * MineSHOP API v1.96 Lite
  3. * Atualizada em 07/07/2017
  4. */
  5.  
  6. public class Main extends JavaPlugin implements Listener{
  7.    
  8.     // Código de exemplo da utilização da API do MineSHOP.
  9.  
  10.     public MineSHOP api;
  11.    
  12.     public void onEnable(){
  13.         api = new MineSHOP(this);
  14.        
  15.         api.getChachedPlayer(player); // Retorna a classe onde salva os pontos do jogador (Cache).
  16.         api.getPontos(player); // Retorna os pontos do jogador.
  17.         api.setPontos(player, pontos); // Seta os pontos do jogador.
  18.        
  19.     }
  20.    
  21.     @EventHandler
  22.     public void onBuy(ShopBuyEvent e){ // Evento quando um jogador compra algum item no shop.
  23.        
  24.         e.getPlayer(); // Retorna o player.
  25.         e.getEventItem(); // Retorna o item.
  26.         e.getProductName(); // Retorna o nome do produto (Config path).
  27.         e.getChachePlayer(); // Retorna o cache do jogador.
  28.        
  29.     }
  30. }
Advertisement
Add Comment
Please, Sign In to add comment