SHARE
TWEET

Untitled

a guest Feb 19th, 2019 78 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. package fr.albin.matsp1;
  2.  
  3. import org.bukkit.Bukkit;
  4. import org.bukkit.Material;
  5. import org.bukkit.inventory.ShapedRecipe;
  6. import org.bukkit.plugin.java.JavaPlugin;
  7.  
  8. import fr.albin.matsp1.core.ItemUtils;
  9.  
  10. public class Main extends JavaPlugin{
  11.    
  12.     ItemUtils u = new ItemUtils();
  13.    
  14.     @Override
  15.     public void onEnable() {
  16.         System.out.println("mat pl #1");
  17.         addCraftGoldenNegget();
  18.         addCraftOakSapling();
  19.         addCraftSeeds();
  20.         addCraftSUGAR_CANE();
  21.         addCraftCatus();
  22.         addCraftBEETROOT_SEEDS();
  23.         addCraftPUMPKIN_SEEDS();
  24.         addCraftMELON_SEEDS();
  25.         addCraftNETHER_WARTS();
  26.         addCraftCocoa();
  27.         addCraftCoinsNote1();
  28.         addCraftCoinsNote2();
  29.         addCraftCoinsNote3();
  30.         addCraftCoinsNote4();
  31.         addCraftCoinsNote5();
  32.         addCraftCoinsNote6();
  33.         addCraftCoinsNote7();
  34.         addCraftCoinsNote8();
  35.        
  36.     }
  37.     //craft
  38.     public void addCraftGoldenNegget() {
  39.        
  40.         @SuppressWarnings("deprecation")
  41.         ShapedRecipe r = new ShapedRecipe(u.getItem(Material.GOLD_NUGGET, 2));
  42.        
  43.         r.shape("CBC", "BAB", "CBC");
  44.        
  45.         r.setIngredient('A', Material.STONE_PICKAXE);
  46.         r.setIngredient('A', Material.IRON_NUGGET);
  47.        
  48.         Bukkit.addRecipe(r);
  49.    
  50.     }
  51.     public void addCraftOakSapling() {
  52.        
  53.         @SuppressWarnings("deprecation")
  54.         ShapedRecipe r = new ShapedRecipe(u.getItem(Material.SAPLING, 2));
  55.  
  56.         r.shape("CCC", "AEA", "DBD");
  57.        
  58.         r.setIngredient('A', Material.GOLD_NUGGET);    
  59.         r.setIngredient('B', Material.DIRT);
  60.         r.setIngredient('C', Material.STICK);
  61.         r.setIngredient('D', Material.SEEDS);
  62.         r.setIngredient('E', Material.LOG);
  63.        
  64.         Bukkit.addRecipe(r);
  65.    
  66.     }
  67.     public void addCraftSeeds() {
  68.        
  69.         @SuppressWarnings("deprecation")
  70.         ShapedRecipe r = new ShapedRecipe(u.getItem(Material.SEEDS, 3));
  71.  
  72.         r.shape("CCC", "AAA", "BBB");
  73.        
  74.         r.setIngredient('A', Material.GOLD_NUGGET);    
  75.         r.setIngredient('B', Material.DIRT);
  76.         r.setIngredient('C', Material.STICK);
  77.        
  78.         Bukkit.addRecipe(r);
  79.    
  80.     }
  81.     public void addCraftSUGAR_CANE() {
  82.        
  83.         @SuppressWarnings("deprecation")
  84.         ShapedRecipe r = new ShapedRecipe(u.getItem(Material.SUGAR_CANE, 3));
  85.  
  86.         r.shape("DED", "BAB", "DCD");
  87.        
  88.         r.setIngredient('A', Material.SEEDS);      
  89.         r.setIngredient('B', Material.GOLD_NUGGET);
  90.         r.setIngredient('C', Material.SAND);
  91.         r.setIngredient('D', Material.STICK);
  92.        
  93.         Bukkit.addRecipe(r);
  94.    
  95.     }
  96.     public void addCraftCatus() {
  97.        
  98.         @SuppressWarnings("deprecation")
  99.         ShapedRecipe r = new ShapedRecipe(u.getItem(Material.CACTUS, 2));
  100.  
  101.         r.shape("ABA", "ACA", "ADA");
  102.        
  103.         r.setIngredient('A', Material.STICK);      
  104.         r.setIngredient('B', Material.GOLD_NUGGET);
  105.         r.setIngredient('C', Material.SEEDS);
  106.         r.setIngredient('D', Material.SAND);
  107.        
  108.         Bukkit.addRecipe(r);
  109.    
  110.     }
  111.     public void addCraftBEETROOT_SEEDS() {
  112.        
  113.         @SuppressWarnings("deprecation")
  114.         ShapedRecipe r = new ShapedRecipe(u.getItem(Material.BEETROOT_SEEDS, 4));
  115.  
  116.         r.shape("ABA", "BCB", "ABA");
  117.        
  118.         r.setIngredient('A', Material.DIRT);       
  119.         r.setIngredient('B', Material.GOLD_INGOT);
  120.         r.setIngredient('C', Material.SEEDS);
  121.        
  122.         Bukkit.addRecipe(r);
  123.    
  124.     }
  125.     public void addCraftPUMPKIN_SEEDS() {
  126.        
  127.         @SuppressWarnings("deprecation")
  128.         ShapedRecipe r = new ShapedRecipe(u.getItem(Material.PUMPKIN_SEEDS, 4));
  129.  
  130.         r.shape("DBC", "BAB", "CBD");
  131.        
  132.         r.setIngredient('A', Material.DIRT);       
  133.         r.setIngredient('B', Material.GOLD_INGOT);
  134.         r.setIngredient('C', Material.SEEDS);
  135.         r.setIngredient('D', Material.IRON_INGOT);
  136.        
  137.         Bukkit.addRecipe(r);
  138.    
  139.     }
  140.     public void addCraftMELON_SEEDS() {
  141.        
  142.         @SuppressWarnings("deprecation")
  143.         ShapedRecipe r = new ShapedRecipe(u.getItem(Material.MELON_SEEDS, 4));
  144.  
  145.         r.shape("CBD", "BAB", "DBC");
  146.        
  147.         r.setIngredient('A', Material.DIRT);       
  148.         r.setIngredient('B', Material.GOLD_INGOT);
  149.         r.setIngredient('C', Material.SEEDS);
  150.         r.setIngredient('D', Material.IRON_INGOT);
  151.        
  152.         Bukkit.addRecipe(r);
  153.    
  154.     }
  155.     public void addCraftNETHER_WARTS() {
  156.        
  157.         @SuppressWarnings("deprecation")
  158.         ShapedRecipe r = new ShapedRecipe(u.getItem(Material.NETHER_WARTS, 1));
  159.  
  160.         r.shape("BAB", "ACA", "BAB");
  161.        
  162.         r.setIngredient('A', Material.SOUL_SAND);      
  163.         r.setIngredient('B', Material.GOLD_BLOCK);
  164.         r.setIngredient('C', Material.NETHERRACK);
  165.        
  166.         Bukkit.addRecipe(r);
  167.    
  168.     }
  169.     public void addCraftCocoa() {
  170.        
  171.         @SuppressWarnings("deprecation")
  172.         ShapedRecipe r = new ShapedRecipe(u.getItem(Material.COCOA, 4));
  173.  
  174.         r.shape("BAB", "CAC", "BAB");
  175.        
  176.         r.setIngredient('A', Material.LOG);    
  177.         r.setIngredient('B', Material.GOLD_NUGGET);
  178.         r.setIngredient('C', Material.SEEDS);
  179.        
  180.         Bukkit.addRecipe(r);
  181.    
  182.     }
  183.     //craft 2
  184.     public void addCraftCoinsNote1() {
  185.        
  186.         @SuppressWarnings("deprecation")
  187.         ShapedRecipe r = new ShapedRecipe(u.getItem(Material.PAPER, 4));
  188.  
  189.         r.shape("AAA", "ABA", "AAA");
  190.        
  191.         r.setIngredient('A', Material.SEEDS);      
  192.         r.setIngredient('B', Material.PAPER);
  193.        
  194.         Bukkit.addRecipe(r);
  195.    
  196.     }
  197.     public void addCraftCoinsNote2() {
  198.        
  199.         @SuppressWarnings("deprecation")
  200.         ShapedRecipe r = new ShapedRecipe(u.getItem(Material.PAPER, 1));
  201.  
  202.         r.shape("AAA", "ABA", "AAA");
  203.        
  204.         r.setIngredient('A', Material.COCOA);      
  205.         r.setIngredient('B', Material.PAPER);
  206.        
  207.         Bukkit.addRecipe(r);
  208.    
  209.     }
  210.     public void addCraftCoinsNote3() {
  211.        
  212.         @SuppressWarnings("deprecation")
  213.         ShapedRecipe r = new ShapedRecipe(u.getItem(Material.PAPER, 1));
  214.  
  215.         r.shape("AAA", "ABA", "AAA");
  216.        
  217.         r.setIngredient('A', Material.PUMPKIN_SEEDS);      
  218.         r.setIngredient('B', Material.PAPER);
  219.        
  220.         Bukkit.addRecipe(r);
  221.    
  222.     }
  223.     public void addCraftCoinsNote4() {
  224.        
  225.         @SuppressWarnings("deprecation")
  226.         ShapedRecipe r = new ShapedRecipe(u.getItem(Material.PAPER, 1));
  227.  
  228.         r.shape("AAA", "ABA", "AAA");
  229.        
  230.         r.setIngredient('A', Material.SUGAR_CANE);     
  231.         r.setIngredient('B', Material.PAPER);
  232.        
  233.         Bukkit.addRecipe(r);
  234.    
  235.     }
  236.     public void addCraftCoinsNote5() {
  237.        
  238.         @SuppressWarnings("deprecation")
  239.         ShapedRecipe r = new ShapedRecipe(u.getItem(Material.PAPER, 1));
  240.  
  241.         r.shape("AAA", "ABA", "AAA");
  242.        
  243.         r.setIngredient('A', Material.MELON_SEEDS);    
  244.         r.setIngredient('B', Material.PAPER);
  245.        
  246.         Bukkit.addRecipe(r);
  247.    
  248.     }
  249.     public void addCraftCoinsNote6() {
  250.        
  251.         @SuppressWarnings("deprecation")
  252.         ShapedRecipe r = new ShapedRecipe(u.getItem(Material.PAPER, 1));
  253.  
  254.         r.shape("AAA", "ABA", "AAA");
  255.        
  256.         r.setIngredient('A', Material.NETHER_WARTS);       
  257.         r.setIngredient('B', Material.PAPER);
  258.        
  259.         Bukkit.addRecipe(r);
  260.    
  261.     }
  262.     public void addCraftCoinsNote7() {
  263.        
  264.         @SuppressWarnings("deprecation")
  265.         ShapedRecipe r = new ShapedRecipe(u.getItem(Material.PAPER, 1));
  266.  
  267.         r.shape("AAA", "ABA", "AAA");
  268.        
  269.         r.setIngredient('A', Material.BEETROOT_SEEDS);     
  270.         r.setIngredient('B', Material.PAPER);
  271.        
  272.         Bukkit.addRecipe(r);
  273.    
  274.     }
  275.     public void addCraftCoinsNote8() {
  276.        
  277.         @SuppressWarnings("deprecation")
  278.         ShapedRecipe r = new ShapedRecipe(u.getItem(Material.PAPER, 1));
  279.  
  280.         r.shape("AAA", "ABA", "AAA");
  281.        
  282.         r.setIngredient('A', Material.CACTUS);     
  283.         r.setIngredient('B', Material.PAPER);
  284.        
  285.         Bukkit.addRecipe(r);
  286.    
  287.     }
  288. }
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