Skip to content

Instantly share code, notes, and snippets.

View aikar's full-sized avatar
:atom:
Powered by Steak

Daniel Ennis aikar

:atom:
Powered by Steak
View GitHub Profile
# This is the main configuration file for Paper.
# As you can see, there's tons to configure. Some options may impact gameplay, so use
# with caution, and make sure you know what each option does before configuring.
#
# If you need help with the configuration or have any questions related to Paper,
# join us in our IRC channel.
#
# IRC: #paper @ irc.spi.gt ( http://irc.spi.gt/iris/?channels=paper )
# Wiki: https://paper.readthedocs.org/
# Paper Forums: https://aquifermc.org/
@aikar
aikar / macros.conf
Last active October 1, 2023 20:08
Example of Apache mod_macro
<Macro Site $domain>
Use Log $domain
Use ForceDomain $domain
Use GrantAccess /
</Macro>
<Macro Domain $domain>
ServerName $domain
ServerAlias www.$domain
</Macro>
//
// Created by Aikar on 4/2/2023.
//
#ifndef SAOMEGA_BLUEPRINTCACHE_H
#define SAOMEGA_BLUEPRINTCACHE_H
#include "includes.h"
class BlueprintCache {
/*
* Copyright (c) 2016. Starlis LLC / dba Empire Minecraft
*
* This source code is proprietary software and must not be redistributed without Starlis LLC's approval
*
*/
package com.empireminecraft.util.serialization;
import com.empireminecraft.util.ItemUtil;
@aikar
aikar / CommandCompletions.java
Last active August 9, 2022 11:20
Empire Command SystemFramework licensed MIT - WORK TO MAKE THIS A LIBRARY: https://github.com/aikar/commands
/*
* Copyright (c) 2016. Starlis LLC / dba Empire Minecraft
*
* This source code is proprietary software and must not be redistributed without Starlis LLC's approval
*
*/
package com.empireminecraft.commands;
import com.empireminecraft.config.EmpireServer;
@aikar
aikar / TaskChain.java
Last active August 9, 2022 11:20
TaskChain v2.6 - Java 8 Version - Released Open Source Under MIT - Pre Java8 version here: https://gist.github.com/aikar/9010136 - learn about TC: https://aikar.co/2015/07/26/async-development-java-control-flow-for-bukkit/
/*
* TaskChain for Bukkit
*
* Written by Aikar <aikar@aikar.co>
* https://aikar.co
* https://starlis.com
*
* @license MIT
*/
From da976f7ed15b762ef138b55b9c711184363cf364 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Thu, 30 Aug 2018 22:38:31 -0400
Subject: [PATCH] Async Chunk Loading and Generation
---
.../java/net/minecraft/server/ChunkMap.java | 3 +-
.../minecraft/server/ChunkProviderServer.java | 24 +-
.../minecraft/server/ChunkRegionLoader.java | 2 +-
.../minecraft/server/DataPaletteBlock.java | 4 +
@aikar
aikar / apatch.sh
Created October 19, 2015 01:46
apt-get install wiggle
#!/bin/bash
applied=$(echo $1 | sed 's/.patch$/-applied\.patch/g')
if [ "$1" == "--reset" ]; then
git am --abort
git reset --hard
git clean -f
exit 0
fi
if [ ! -f "$1" ]; then
echo "No patch found $1";
@aikar
aikar / nodejs-minecraft-colors.js
Created July 29, 2015 03:40
node.js / javascript Methods to convert section symbol minecraft color codes into Bash Color sequences, for use in shell output. Credits to mcrcon for the color code map.
var colors = {
0: "\033[0;30m", /* 00 BLACK 0x30 */
1: "\033[0;34m", /* 01 BLUE 0x31 */
2: "\033[0;32m", /* 02 GREEN 0x32 */
3: "\033[0;36m", /* 03 CYAN 0x33 */
4: "\033[0;31m", /* 04 RED 0x34 */
5: "\033[0;35m", /* 05 PURPLE 0x35 */
6: "\033[0;33m", /* 06 GOLD 0x36 */
7: "\033[0;37m", /* 07 GREY 0x37 */
8: "\033[1;30m", /* 08 DGREY 0x38 */
@aikar
aikar / ChunkStateFix.patch
Last active January 18, 2022 17:26
Fixes the dupe exploit caused by chunks being oversized more than the RegionFile format can support. Patch is licensed under MIT or Public Domain. Anyone (hopefully Mojang) is free to use it.
commit ba4afed44f76c2d0b8ba63439ecc28b6c2212d05
Author: Aikar <aikar@aikar.co>
Date: Fri Feb 15 01:08:19 2019 -0500
Allow Saving of Oversized Chunks
The Minecraft World Region File format has a hard cap of 1MB per chunk.
This is due to the fact that the header of the file format only allocates
a single byte for sector count, meaning a maximum of 256 sectors, at 4k per sector.