Skip to content

Instantly share code, notes, and snippets.

@14mRh4X0r
14mRh4X0r / ff_first.patch
Created May 1, 2012 20:12
Patch for MCP to only check for wine when necessary
diff --git a/runtime/commands.py b/runtime/commands.py
index f497962..62ec33a 100644
--- a/runtime/commands.py
+++ b/runtime/commands.py
@@ -248,24 +248,30 @@ class Commands(object):
self.has_jad = False
self.has_ff = False
self.has_astyle = False
+
+ self.fernflower = os.path.normpath(self.config.get('COMMANDS', 'Fernflower'))
@14mRh4X0r
14mRh4X0r / Hooked.java
Created December 11, 2011 17:00
General class to call custom hooks, by Nijikokun
/**
* Hooked.java
* <br><br>
* Controls custom hook information by easily helping you figure out what is what without recieving errors on the matter.
*
* @author Nijikokun <[email protected]>
*/
public class Hooked {
public Hooked() {
@14mRh4X0r
14mRh4X0r / ServerController.sh
Created November 4, 2011 09:17
Linux script for ServerControl
#!/bin/bash
while [ -e restart.txt ]; do
rm restart.txt
java -Xms1024M -Xmx1024M -jar CanaryMod.jar nogui
done
/** The {@code BaseCommand} that's handling the command */
private static final BaseCommand tpto = new BaseCommand(
"[x] [y] [z] - Teleports you to the given coordinates",
"Usage: /tpto [x] [y] [z]", 4, 5) {
@Override
void execute(MessageReceiver caller, String[] split) {
Player toWarp;
if (split.length == 5) {
if ((toWarp = etc.getServer().matchPlayer(split[4])) == null) {
caller.notify("Could not find player " + split[4]);
@14mRh4X0r
14mRh4X0r / gist:863048
Created March 9, 2011 21:29
Fix for players being able to issue server commands.
diff --git a/src/Player.java b/src/Player.java
index dd52edc..d9ca468 100644
--- a/src/Player.java
+++ b/src/Player.java
@@ -712,7 +712,7 @@ public class Player extends HumanEntity implements MessageRe
log.info(getName() + " created a lighter!");
giveItem(259, 1);
}
- } else if ((command.startsWith("/#")) && (etc.getMCServer().f.g(get
+ } else if ((command.startsWith("/#")) && (etc.getMCServer().f.h(get