Skip to content

Instantly share code, notes, and snippets.

Avatar

Jori van Ee JustMaffie

View GitHub Profile
@JustMaffie
JustMaffie / HexUtils.java
Created Jun 28, 2020
HexUtils Resource
View HexUtils.java
public class HexUtils {
private static final Pattern regex = Pattern.compile("&#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3}).*?");
public static String parseHexColors(String message) {
final Matcher matcher = regex.matcher(message);
while (matcher.find()) {
final String color = matcher.group();
final String hexcolor = color.substring(1);
ChatColor c = null;
try {
View PremiumPunishmentsApi.java
package com.justmaffie.spigot.premiumpunishments;
import com.justmaffie.spigot.premiumpunishments.data.storage.PunishmentQuery;
import org.bukkit.OfflinePlayer;
public interface PremiumPunishmentsApi {
/**
* Return a new query class to filter punishments
*
* @return The new query
View keybase.md

Keybase proof

I hereby claim:

  • I am justmaffie on github.
  • I am justmaffie (https://keybase.io/justmaffie) on keybase.
  • I have a public key ASDT3a_UoIJot790XwwQJcDvJYrOrX1l9nej_5KhRfuQ8go

To claim this, I am signing this object:

View lol.py
def on_message(self, message):
crashChar = "ौौौौ"
if crashChar in message.content:
try:
await bot.delete_message(message)
await bot.send_message(message.channel, "**I've delete a message posted by {} because it contained characters which crashes discord. I've also banned him.**".format(message.author.name + "#" + message.author.discriminator + "(ID: " + message.author.id + ")"))
await message.server.ban(message.author, "Causing discord to crash because of weird characters.")
except:
pass
You can’t perform that action at this time.