Skip to content

Instantly share code, notes, and snippets.

Avatar
🏳️‍🌈
👀

Max Lee Phoenix616

🏳️‍🌈
👀
View GitHub Profile
@Phoenix616
Phoenix616 / ParticleClicks.java
Last active May 24, 2018
Click on particles...
View ParticleClicks.java
HashMap<UUID,Location> stands = new HashMap<UUID, Location>();
double particleHeight = 1.5;
public void onEnable() {
getServer().getPluginManager().registerEvents(this, this);
Bukkit.getScheduler().scheduleSyncRepeatingTask(this, new Runnable() {
@Override
public void run() {
@Phoenix616
Phoenix616 / proxy_screen_away.pl
Created Mar 13, 2016
Irssi script to automatic set (un)away status to react on wether or not a screen is attached and a proxy is connected, fork of screen_away.pl by ads
View proxy_screen_away.pl
use Irssi;
use strict;
use FileHandle;
use vars qw($VERSION %IRSSI);
$VERSION = "0.9.8.1 - 1.0";
%IRSSI = (
authors => 'Phoenix616 <mail@moep.tv>, Andreas \'ads\' Scherbaum <ads@wars-nicht.de>',
name => 'proxy_and_screen_away',
@Phoenix616
Phoenix616 / LingeringPotionPvpFix.java
Last active May 4, 2016
Fix the usage of lingering potions in PvP with WG6
View LingeringPotionPvpFix.java
import com.sk89q.worldguard.LocalPlayer;
import com.sk89q.worldguard.bukkit.RegionContainer;
import com.sk89q.worldguard.bukkit.RegionQuery;
import com.sk89q.worldguard.bukkit.WGBukkit;
import com.sk89q.worldguard.bukkit.util.Materials;
import com.sk89q.worldguard.protection.flags.DefaultFlag;
import com.sk89q.worldguard.protection.flags.StateFlag;
import org.bukkit.entity.LivingEntity;
import org.bukkit.entity.Player;
@Phoenix616
Phoenix616 / TranslationMapping.java
Last active Aug 19, 2018
Translation mappings to be used with Bukkit's Material names and Minecrafts translation system, needs ConfigAccessor.java: https://gist.github.com/Phoenix616/a629223a89b60d710da457f5f7f57ecc
View TranslationMapping.java
/*
* TranslationMapping is an util for mapping pre 1.13 Bukkit materials to
* the language keys of minecraft items in the language files of the client
*
* Licensed under the following (MIT) license:
*
* Copyright (C) 2018 Max Lee (https://github.com/Phoenix616)
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@Phoenix616
Phoenix616 / ConfigAccessor.java
Last active May 1, 2021 — forked from MrZoraman/ConfigAccessor.java
Utility to access yaml files in bukkit
View ConfigAccessor.java
/*
* Copyright (C) 2012
*
* 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:
*
@Phoenix616
Phoenix616 / IconRpMapping.java
Last active Nov 2, 2020
IconRpMapping - Display Minecraft item stacks in chat with WolfieMario's Text Icon Resource pack. For more info see README.md.
View IconRpMapping.java
package de.themoep.utils;
/*
* IconRpMapping utils for mapping of Bukkit materials to WolfieMario's
* Custom Text Icons Resourcepack (https://s.moep.tv/iconrp)
* Copyright (C) 2018 Max Lee aka Phoenix616 (mail@moep.tv)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
@Phoenix616
Phoenix616 / searchnbt.js
Last active Dec 6, 2016
WorldEdit craftscript to search through the NBT of blocks in your selection. Supports regex.
View searchnbt.js
importPackage(Packages.com.sk89q.worldedit);
importPackage(Packages.com.sk89q.worldedit.blocks);
function main() {
context.checkArgs(1, -1, "<regex>");
var regexString = argv[1];
for (var i = 2; i < argv.length; i++) {
regexString += " " + argv[i];
@Phoenix616
Phoenix616 / SwitchSoundDevice.ahk
Last active Apr 13, 2020
Switch sound devices with AutoHotKey under Windows on a button press. Supports separate media channel redirection. Uses NirSoft's NirCmd and SoundVolumeView
View SwitchSoundDevice.ahk
; Switch Sound Device by Phoenix616
; Based on work by fohrums:
; https://autohotkey.com/board/topic/68257-toggle-set-default-audio-device-in-windows-7/page-2#entry632858)
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
#Warn ; Recommended for catching common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
nirSoundVolumeViewPath := "D:\Programme\NirSoftPackage\NirSoft\SoundVolumeView.exe"
@Phoenix616
Phoenix616 / unique-irc-client-stargazers.md
Last active Feb 13, 2018
Unique GitHub Stargazers of popular IRC clients
View unique-irc-client-stargazers.md
View get_unique_line_count.sh
echo "File: unique (total - duplicate)"
for file in "$@"; do
for compare in "$@"; do
if [ "$file" == "$compare" ]; then
continue;
fi;
cat $compare >> /tmp/get_unique_line_count-others.txt
done;
lines=$(cat $file | wc -l)
duplicate=$(comm -12 <( sort $file ) <( sort /tmp/get_unique_line_count-others.txt ) | wc -l)