Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
#StaySafe

Reflxction ReflxctionDev

🏠
#StaySafe
View GitHub Profile
View -perks-shop.yml
Title: '&5Perks Shop'
Rows: 3.0
Items:
'0':
Type: snowball
Count: 5.0
Enchantments:
- INFINITY:1
DisplayName: '&2Acidic Snowballs'
Lore:
@ReflxctionDev
ReflxctionDev / MappedConfiguration.java
Created Nov 11, 2020
An alternative to Bukkit's YamlConfiguration which allows direct serializing and deserializing of objects
View MappedConfiguration.java
package io.github.config.gui;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.google.gson.TypeAdapter;
import com.google.gson.TypeAdapterFactory;
import com.google.gson.internal.Primitives;
import com.google.gson.reflect.TypeToken;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonToken;
View Protocol.java
import org.bukkit.Bukkit;
import org.bukkit.Server;
/**
* A simple utility for dealing with protocol-specific code
*/
public class Protocol {
/**
View DelayData.java
import org.bukkit.Bukkit;
import org.bukkit.OfflinePlayer;
import java.util.HashMap;
import java.util.Map;
import java.util.UUID;
import java.util.function.Consumer;
/**
* Represents data for delays
View DelayExecutor.java
import com.google.common.base.Preconditions;
import org.bukkit.Bukkit;
import org.bukkit.OfflinePlayer;
import org.bukkit.plugin.java.JavaPlugin;
import org.bukkit.scheduler.BukkitTask;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import java.util.Map.Entry;
@ReflxctionDev
ReflxctionDev / DelayData.java
Created Nov 26, 2019
A simple delay management utility
View DelayData.java
import org.bukkit.Bukkit;
import org.bukkit.OfflinePlayer;
import java.util.HashMap;
import java.util.Map;
import java.util.UUID;
import java.util.function.Consumer;
/**
@ReflxctionDev
ReflxctionDev / DelayExecutor.java
Created Nov 26, 2019
A simple delay management utility
View DelayExecutor.java
import com.google.common.base.Preconditions;
import org.bukkit.Bukkit;
import org.bukkit.OfflinePlayer;
import org.bukkit.plugin.java.JavaPlugin;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import java.util.Map.Entry;
import java.util.UUID;
View WarpsCommand.java
/*
* * Copyright 2019 github.com/ReflxctionDev
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
View -example-mode.json
{
"enabled": true,
"key": "example-mode",
"displayName": "&9Example",
"chatPrefix": "&a[&eExample&a] ",
"runCommandsByWinner": [],
"runCommandsByConsoleForWinner": [],
"preventItemDropping": true,
"dropMinedBlocks": false,
"givePotionEffects": [
View -example-mode.json
{
"enabled": true,
"key": "example-mode",
"displayName": "&9Example",
"chatPrefix": "&a[&eExample&a] ",
"runCommandsByWinner": [],
"runCommandsByConsoleForWinner": [],
"preventItemDropping": true,
"dropMinedBlocks": false,
"givePotionEffects": [