Skip to content

Instantly share code, notes, and snippets.

View Mindgamesnl's full-sized avatar
🌸
もののあわれ

Mats - ToetMats Mindgamesnl

🌸
もののあわれ
View GitHub Profile
@Mindgamesnl
Mindgamesnl / ConfigFile.java
Created September 12, 2018 07:31
Stand Alone Config System
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.nio.charset.Charset;
import java.nio.file.Files;
import java.util.LinkedHashMap;
import java.util.Map;
public class ConfigFile {
@Mindgamesnl
Mindgamesnl / very nice.md
Last active August 18, 2023 14:52
Inventory holders, a quicky

Inventory holders can be used to register own types, handlers and data to a opened GUI for a player.

To start, we need to create our menu class that implemetns InventoryHolder and any other functions we may want. For this example, we are gonna fill the inventory and open it for player, then save the player for later ussage with our handler.

The menu

It will look something like this

import org.bukkit.Bukkit;
import org.bukkit.Material;
@Mindgamesnl
Mindgamesnl / keybase.md
Created April 11, 2019 10:39
keybase.md

Keybase proof

I hereby claim:

  • I am mindgamesnl on github.
  • I am mindgamesnl (https://keybase.io/mindgamesnl) on keybase.
  • I have a public key whose fingerprint is 5029 522A C90F 7789 E39B 4128 CAA7 19CE 52C6 CDC5

To claim this, I am signing this object:

@Mindgamesnl
Mindgamesnl / Experience.java
Created July 15, 2019 13:53 — forked from Jikoo/Experience.java
A utility for managing experience with Bukkit.
package com.github.jikoo.experience;
import org.bukkit.entity.Player;
/**
* A utility for managing Player experience properly.
*
* @author Jikoo
*/
public class Experience {
@Mindgamesnl
Mindgamesnl / DataWatcher.java
Last active July 24, 2023 06:48
A simple bukkit datawatcher
import org.bukkit.Bukkit;
import org.bukkit.plugin.java.JavaPlugin;
import java.util.function.Consumer;
public class DataWatcher<T> {
private T value;
private int task;
private Feeder<T> dataFeeder;
@Mindgamesnl
Mindgamesnl / play-command.json
Last active August 29, 2019 09:35
snippits for medium
{
"channel": "CLIENT_OUT_CREATE_MEDIA",
"payload": {
"media": {
"loop": false,
"source": "https://example.com/never-gonna-give-you-up.mp3",
"startInstant": 1567071225,
"flag": "DEFAULT"
}
}
@Mindgamesnl
Mindgamesnl / eula.txt
Created September 3, 2019 09:59
true eula
#By changing the setting below to TRUE you are indicating your agreement to our EULA (https://account.mojang.com/documents/minecraft_eula).
#and also agreeing that tacos are tasty.
#Tue Sep 03 10:57:42 BST 2019
eula=true
@Mindgamesnl
Mindgamesnl / BlockBoundingBox.java
Last active May 17, 2020 22:11
Minecraft block/material bounding boxes for collision detection. All exported from the game itself and converted so you don't have to.
public enum BlockBoundingBox {
BIRCH_FENCE_GATE(144, 66, 238.375, 145, 67, 238.625),
LIME_CONCRETE(144, 66, 238, 145, 67, 239),
LIGHT_BLUE_STAINED_GLASS(144, 66, 238, 145, 67, 239),
GREEN_BED(144, 66, 238, 145, 66.5625, 239),
PURPLE_CARPET(144, 66, 238, 145, 66.0625, 239),
LIGHT_GRAY_CONCRETE_POWDER(144, 66, 238, 145, 67, 239),
YELLOW_GLAZED_TERRACOTTA(144, 66, 238, 145, 67, 239),
PEONY(144, 66, 238, 145, 67, 239),
@Mindgamesnl
Mindgamesnl / EventInterceptor.java
Last active May 17, 2020 22:13
Event interceptor
import org.bukkit.Bukkit;
import org.bukkit.event.*;
import org.bukkit.plugin.EventExecutor;
import org.bukkit.plugin.RegisteredListener;
import java.lang.reflect.Field;
import java.lang.reflect.Modifier;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
@Mindgamesnl
Mindgamesnl / nordvpn-aliases.sh
Last active August 24, 2020 07:16
Linux aliases for my most used NordVPN locations
alias london="nordvpn connect United_Kingdom London"
alias amsterdam="nordvpn connect Netherlands Amsterdam"
alias losangeles="nordvpn connect United_States Los_Angeles"
alias la="nordvpn connect United_States Los_Angeles"
alias toronto="nordvpn connect Canada Toronto"
alias vancouver="nordvpn connect Canada Vancouver"