Skip to content

Instantly share code, notes, and snippets.

View me4502's full-sized avatar
🙃
Developing WorldEdit, WorldGuard and CraftBook

Maddy Miller me4502

🙃
Developing WorldEdit, WorldGuard and CraftBook
View GitHub Profile
@me4502
me4502 / Asset System.md
Created September 4, 2020 02:14
Plans for the new WorldEdit Asset system

Asset System Design

This document lays out the plans and potential future use cases for the WorldEdit Asset system

Purpose

The asset system is designed to allow various functions of WorldEdit to have a central place to access shared assets, each having different use cases.

For example, loading schematics, images, etc as clipboards. Or loading images as masks.

Design Philosophy

The base design here, is a system where you provide it a NIO Path, as well as an expected return type. An example usage would be loadAsset(Clipboard.class, path).

@Listener
public void onDispense(DropItemEvent.Dispense event, @First LocatableBlock dispenser) {
if (dispenser.getBlockState().getType() != BlockTypes.DISPENSER) {
return;
}
Dispenser dispenserTile = (Dispenser) dispenser.getLocation().getTileEntity().get();
ItemStack[] items = StreamSupport.stream(dispenserTile.getInventory().slots().spliterator(), false)
.map(Inventory::peek)
# Initialize all the fireworks
start twinkleBurst
set.shape burst
set.twinkle
set.color 255,0,0
set.fade 0,0,255
build twinkleBurst
start twinkleBall
set.shape sball
package com.me4502.benchmarks;
import org.openjdk.jmh.annotations.Benchmark;
public class MethodAccessIf {
private static final A zee = new Z();
private static final A bee = new B();
private static final A cee = new C();
private static final A dee = new D();

Keybase proof

I hereby claim:

  • I am me4502 on github.
  • I am me4502 (https://keybase.io/me4502) on keybase.
  • I have a public key whose fingerprint is 34BC 2176 8C3D E7C1 1E88 EA16 0A9E D6FF B546 16B9

To claim this, I am signing this object:

@me4502
me4502 / id_ID.yml
Created August 13, 2013 11:33
Indonesian language translation for CraftBook
mech:
teleport:
alert: Kamu teleport!
range: Terlalu jauh!
create: Teleporter dibuat!
arriveonly: Kamu hanya dapat tiba di teleporter ini!
sign: Ini ada tanda-tanda di tempat tujuan kamu!
command-items:
wait-seconds: seconds to use this again!
need-use: to use this command!
@me4502
me4502 / en_AU.yml
Last active December 21, 2015 00:09
An Australian Language Pack for CraftBook.
mech:
teleport:
alert: You Teleported!
range: Out of Range!
create: Teleporter Created!
arriveonly: You can only arrive at this teleporter!
sign: There is no Sign at your Destination!
command-items:
wait-seconds: seconds to use this again!
need-use: to use this command!
@me4502
me4502 / gist:6060104
Created July 23, 2013 05:42
Why Per-World-Plugins SHOULD NOT BE DONE.
1. Plugins which claim to offer a per-world solution are using very hacky methods to do so, they cause major issues and should never be used.
More info:
If a plugin itself implements it's own version of a multiworld system, that is fine. It's when another plugin steps in and takes the matter into its own hands for other plugins that it becomes troublesome. Plugins that do that modify the way bukkit processes commands, events, and even modifies portions of the bukkit API to stop other worlds being seen as existent to certain plugins. Not only does this make giant assumptions about the way every plugin works, but it also causes issues with the bukkit API not doing what it is supposed to do. And with the way the event system works, overriding what plugins receive what events becomes incredibly troublesome.
(Proof of my legitimacy:
Firstly due to the way bukkit works, hacky changes is the only way to achieve this. I figured this out because I know how bukkit works, and I am very active and OP in the WorldEdit