Skip to content

Instantly share code, notes, and snippets.

View kvizdos's full-sized avatar
💭
working on PRAUXY.app

Kenton Vizdos kvizdos

💭
working on PRAUXY.app
View GitHub Profile
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!");
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)) {
@kvizdos
kvizdos / Custom Bukkit ANDOR Spigot Crafting Recipes
Created February 10, 2017 02:45
If you would like a more in-depth video on this, either visit my Twitter (@kvizdos) and ask me, or watch my YouTube video about it, located https://youtu.be/R_TvwakuCAc, or, if neither of those work, join my Discord channel, where you can talk to me about it Join Code: discord.gg/sGzwhKG!
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*"