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
Created April 19, 2014 04:48
Bastion XML
<?xml version="1.0"?>
<map proto="1.3.2">
<name>Bastion</name>
<version>1.0</version>
<objective>Capture the wool from the enemy's side and return it safely to your victory monument!</objective>
<authors>
<author>EnarRikardz</author>
<author>DiamondAx</author>
</authors>
@rmsy
rmsy / filters.md
Last active August 29, 2015 14:05
New filter usage.

Usage

Game Mode

Kit:

<game-mode>creative</game-mode>

Sets the player to creative mode.

Filter:

@rmsy
rmsy / TeleportListener.java
Created February 20, 2012 14:50
The TeleportListener class from the Telejecter project.
package com.me.rmsy.telejecter;
import org.bukkit.Location;
import org.bukkit.entity.Minecart;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import org.bukkit.event.Listener;
import org.bukkit.event.player.PlayerTeleportEvent;
@rmsy
rmsy / CONTROL
Created March 4, 2012 02:56
The CONTROL file for LevelUnlocker.
Package: com.me.rmsy.levelunlocker
Name: LevelUnlocker
Version: 2.0
Priority: standard
Depends: com.ericasadun.utilities, coreutils, wget, com.innoying.sbutils
Architecture: iphoneos-arm
Section: Utilities
Maintainer: Isaac Moore (rmsy) <rmsy@me.com>
Author: Isaac Moore (rmsy) <rmsy@me.com>
Description: Unlock levels in games
@rmsy
rmsy / Death messages
Last active December 14, 2015 02:49
These will be death messages for deaths in MCBall v2.0. Any suggestions are welcome--this Gist will be updated as necessary, reflecting any new changes.
/**
* If the {@link MCBPlayer} was directly hit by a flashbang.
*/
FLASHBANG_DIRECT_HIT(new String[]{"%s took a direct hit from %s's flashbang", "%s hit %s in the face with their flashbang"}, new boolean[]{false, true}),
/**
* If the {@link MCBPlayer} was directly hit by a paintball.
*/
PAINTBALL_DIRECT_HIT(new String[]{"%s got pummeled by %s's speeding paintball", "%s took %s's paintball to the face", "%s didn't quite manage to dodge %s's paintball"}, new boolean[]{false, false, false}),
/**
* If the {@link MCBPlayer} was directly hit by a sniper rifle.
@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
/**
* 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;
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;
// 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:
//
<!-- 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 -->