Skip to content

Instantly share code, notes, and snippets.

Avatar
:atom:
Powered by Steak

Daniel Ennis aikar

:atom:
Powered by Steak
View GitHub Profile
@aikar
aikar / CommandCompletions.java
Last active Aug 9, 2022
Empire Command SystemFramework licensed MIT - WORK TO MAKE THIS A LIBRARY: https://github.com/aikar/commands
View CommandCompletions.java
/*
* 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 Aug 9, 2022
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/
View TaskChain.java
/*
* TaskChain for Bukkit
*
* Written by Aikar <aikar@aikar.co>
* https://aikar.co
* https://starlis.com
*
* @license MIT
*/
View paper.yml
# 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 May 30, 2022
Example of Apache mod_macro
View macros.conf
<Macro Site $domain>
Use Log $domain
Use ForceDomain $domain
Use GrantAccess /
</Macro>
<Macro Domain $domain>
ServerName $domain
ServerAlias www.$domain
</Macro>
View 0001-Async-Chunk-Loading-and-Generation.patch
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 Oct 19, 2015
apt-get install wiggle
View apatch.sh
#!/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 Jul 29, 2015
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.
View nodejs-minecraft-colors.js
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 Jan 18, 2022
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.
View ChunkStateFix.patch
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.
View Serialization.java
/*
* Copyright (c) 2015. 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.Util;
View apatch
#!/bin/bash
noapply=1
if [ $1 == "--noapplied" ]; then
noapply=1
shift
fi
applied=$(echo $1 | sed 's/.patch$/-applied\.patch/g')
if [ "$1" == "--reset" ]; then
git am --abort
git reset --hard