Skip to content

Instantly share code, notes, and snippets.

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

Mats - ToetMats Mindgamesnl

🌸
もののあわれ
View GitHub Profile
@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 / 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 / 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 / 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 / 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 {