This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void onEnable() { | |
getServer().getPluginManager().registerEvents(this, this); | |
} | |
@EventHandler | |
public void onPlayerPlaceBlockEvent(BlockPlaceEvent e) { | |
Player p = e.getPlayer(); | |
if(e.getBlock().getType().equals(Material.DIAMOND_BLOCK)) { | |
p.sendMessage(ChatColor.AQUA + "Nope, this will always be..."+ChatColor.RED+" IMPERFECT!"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void onEnable() { | |
Bukkit.getServer().getPluginManager().registerEvents(this, this); | |
} | |
@EventHandler | |
public void onPlayerBreakBlockEvent(BlockBreakEvent e) { | |
Player p = e.getPlayer(); | |
p.sendMessage("You broke a " + ChatColor.GREEN + e.getBlock().getType()); | |
// TODO: THEN TEST!!!!!!!!!!!!!!!!!!! | |
if(e.getBlock().getType().equals(Material.STONE)) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void onEnable() { | |
// WHAT YOU WANT TO GIVE TO THE PLAYER | |
ItemStack aStand = new ItemStack(Material.ARMOR_STAND); | |
ShapedRecipe arStand = new ShapedRecipe(aStand); | |
// ITS JUST LIKE A CRAFTING BENCH!!! | |
arStand.shape | |
("*H*" |
NewerOlder