Skip to content

Instantly share code, notes, and snippets.

View rmsy's full-sized avatar
🏠
Working from home

Isaac Moore rmsy

🏠
Working from home
View GitHub Profile
@rmsy
rmsy / map.xml
Last active December 20, 2015 12:59
Metadata for Ice Rack.
<?xml version="1.0"?>
<map proto="1.3.0">
<name>Ice Rack</name>
<version>1.0.1</version>
<objective>Capture both of your team's wools!</objective>
<authors>
<author>Tywnis</author>
</authors>
<contributors>
<contributor contribution="Metadata (XML)">iamramsey</contributor>
String[] gameOverMessage = new String[4];
String teamMessage = winningTeam.getColorizedName() + " wins!";
int teamLength = teamMessage.length();
int largestLength = 0;
if (teamLength > 10) {
largestLength = teamLength;
} else {
largestLength = 10;
}
@rmsy
rmsy / filters.xml
Last active December 19, 2015 01:09
Metadata for Biome Battles.
<?xml version="1.0"?>
<map proto="1.3.0">
<rectangle name="playing-field" min="-oo,-oo" max="oo,oo"/>
<playable>
<region name="playing-field"/>
</playable>
<filters>
<filter name="block-filter" parents="deny-blocks"></filter>
import com.sk89q.bukkit.util.BukkitCommandsManager;
import com.sk89q.bukkit.util.CommandsManagerRegistration;
import com.sk89q.minecraft.util.commands.CommandsManager;
import org.bukkit.plugin.java.JavaPlugin;
import org.mcstats.Metrics;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import java.io.IOException;
import java.util.logging.Level;
package com.github.rmsy.litelog.impl.filter;
import com.github.rmsy.litelog.Change;
import com.github.rmsy.litelog.Filter;
import com.google.common.base.Preconditions;
import org.bukkit.Location;
import javax.annotation.Nonnull;
/**
<!-- Root tag -->
<!ELEMENT map (name,version,objective,authors,contributors?,(wools|destroyables|blitz|cores|score),teams,rules?,kits?,toolrepair?,itemremove?,modifybowprojectile?,tnt?,mobs?,killreward?,timelock?,maxbuildheight?,difficulty?,hunger?,multitrade?,regions?,spawns,playable,lanes?,portals?)>
<!-- PGM protocol version -->
<!ATTLIST map proto CDATA #REQUIRED>
<!-- Map display name -->
<!ELEMENT name (#PCDATA)>
<!-- Map version -->
// see line #220
// Protocol Buffers - Google's data interchange format
// Copyright 2008 Google Inc. All rights reserved.
// http://code.google.com/p/protobuf/
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
package net.anxuiz.protobuf.packet.base;
import com.google.common.base.Preconditions;
import com.google.common.collect.BiMap;
import com.google.common.collect.HashBiMap;
import com.google.protobuf.Descriptors.Descriptor;
import com.google.protobuf.Descriptors.FieldDescriptor;
import com.google.protobuf.Descriptors.FieldDescriptor.Type;
import com.google.protobuf.ExtensionRegistry;
import com.google.protobuf.Message;
/**
* Called on a piston extend event.
*
* @param e The piston extend event.
*/
@EventHandler(priority = EventPriority.HIGH, ignoreCancelled = true)
public void onPistonExtend(@Nonnull final BlockPistonExtendEvent e) {
boolean allowed = false;
if (hasPermission(e.getBlock().getRelative(e.getDirection()).getLocation(), WorldEvent.PISTON_EXTENSION)) {
allowed = true;
@rmsy
rmsy / LiquidMetal.java
Last active December 14, 2015 19:38 — forked from steveanton/gist:5132440
Java implementation of *[LiquidMetal by Ryan McGeary](https://github.com/rmm5t/liquidmetal)*, created by [Anxuiz](https://github.com/Anxuiz). Documented and ever-so-slightly modified by [rmsy](https://github.com/rmsy).
/*
* Copyright (c) 2009-2013 Ryan McGeary
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFT