Skip to content

Instantly share code, notes, and snippets.


Nathan Adams Dinnerbone

View GitHub Profile
Dinnerbone /
Created Feb 1, 2012
Might we have made plugins a little too easy? :(
package com.dinnerbone.plugins.greetings;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.player.PlayerJoinEvent;
public class GreetingPlugin extends JavaPlugin implements Listener {
public void onEnable() {
package org.bukkit.types.block;
import java.util.HashMap;
import java.util.Map;
* Represents the various types of blocks in a world.
public abstract class BlockType {
public static final BlockType AIR = new BlockTypeWrapper(0);
View gist:6488256
/sayraw {"text":"Want to reset the current minigame? ", "extra": [{"text":"Click here!", "clickEvent":{"action":"run_command", "value":"/scoreboard players set minigame_resetting 1"}}]}
"text": "Want to reset the current minigame? ",
"extra": [
"text": "Click here!",
"clickEvent": {
"action": "run_command",
Dinnerbone / minecraft_commands.txt
Last active Apr 28, 2020
Minecraft Java Edition 1.13 changes
View minecraft_commands.txt
advancement grant <targets> everything
advancement grant <targets> from <advancement>
advancement grant <targets> only <advancement>
advancement grant <targets> only <advancement> <criterion>
advancement grant <targets> through <advancement>
advancement grant <targets> until <advancement>
advancement revoke <targets> everything
advancement revoke <targets> from <advancement>
advancement revoke <targets> only <advancement>
advancement revoke <targets> only <advancement> <criterion>
Dinnerbone / gist:5631634
Last active May 14, 2020
New chat system for Minecraft. The server won't translate any text for the client, and there'll be a proper stack based colouring/formatting system, so no more leaking colours, english-only messages, or out of date translations.
View gist:5631634
"color": "yellow",
"translate": "multiplayer.player.joined",
"using": [
"color": "gray",

A "node" is an element that looks like this:

    "type": "root|literal|argument",
    "parser": "", // only applicable if type is argument
    "properties": {}, // only applicable if type is argument, defaults to empty object
    "executable": true, // default if not specified is false, meaning it isn't a runnable command by itself
    "children": {}, // default if not specified is {}, meaning no children
    "redirect": [] // default if not specified is null, meaning no redirect
Dinnerbone / gist:3736487
Created Sep 17, 2012
New Minecraft target selector syntax!
View gist:3736487


All target selectors start with @. The following character is the selector type. For example, @p means 'closest player'.

Target selectors may have additional, optional arguments. You can specify these in [ ], using the syntax a=0. For example, @p[a=0,b=5,c=-500].

There is a special short syntax for just specifying x, y, z and r arguments; simply list their values separated by a comma, without x=. For example: @p[100,64,-100,5] for 5 range, x=100, y=64 and z=-100. Each of these are optional and skippable by leaving them empty. For example, to just specify y coordinate: @p[,64].

Global Arguments:

  • x - X coordinate for search center. Default is senders coordinate, or 0.
  • y - Y coordinate for search center. Default is senders coordinate, or 0.
Dinnerbone / gist:5662824
Created May 28, 2013
As an essential step towards the Minecraft modding API, and also for sanity's sake in our own code, we're removing Texture Packs and replacing them with a new Resource Pack system. Ultimately, every mod/plugin will be its own resource pack, vanilla will be a resource pack by itself, and users will be able to apply multiple resource packs at once…
View gist:5662824
"//comment": "All metainfo files will be ORIGINAL_FILE.mcmeta. For example, textures/blocks/portal.png.mcmeta. The format is, of course, JSON.",
"animation": {
"//comment": "This block will be required for animated textures. It can be an empty block, but it will be needed to detect an animation.",
"frames": [
{"index": 2, "time": 4},
Dinnerbone / spawn_bonus_chest.json
Created Oct 19, 2015
This is an example of the current spawn bonus chest loot table in Minecraft, in the (possibly) new loot table data format.
View spawn_bonus_chest.json
"item": "minecraft:stick",
"weight": 10,
"functions": [
"function": "minecraft:set_count",
"min": 1,
"max": 3