Skip to content

Instantly share code, notes, and snippets.

View Ayouuuu's full-sized avatar

Ayou Ayouuuu

  • Location
View GitHub Profile
@SizableShrimp
SizableShrimp / README.md
Last active April 17, 2025 08:36
How to fix Java libraries not loading in Minecraft Forge 1.17+

How to fix Java libraries not loading in Minecraft Forge 1.17+

By default, Minecraft Forge does not load dependencies from the classpath unless they are explicitly declared as mods. These steps outline how to remedy this. This guide assumes that:

  1. You are on ForgeGradle 5 or higher.
  2. You are on Forge 1.17.1 (37.0.13) or higher.

Using Java libraries

To configure your Java libraries to be loaded by Forge, you should use the minecraftLibrary configuration provided by ForgeGradle. You now must make sure to declare your dependencies using minecraftLibrary configuration.

@Excel619
Excel619 / PlayerDropItemSlotEvent.java
Last active September 9, 2024 03:11
Custom PlayerDropItemEvent including the slot
import org.bukkit.entity.Player;
import org.bukkit.event.Cancellable;
import org.bukkit.event.Event;
import org.bukkit.event.HandlerList;
import org.bukkit.inventory.Inventory;
import org.bukkit.inventory.ItemStack;
public class PlayerDropItemSlotEvent extends Event implements Cancellable {
private final Player player;
@KingAlterIV
KingAlterIV / Prefix & Suffix Nametag.md
Last active August 2, 2024 01:55
The proper way of adding a prefix and suffix to nametags of a player using Scoreboard Teams made with packets and is possibly horribly made by me!

Feel free to update and expand upon this.

Requirements

  • ProtocolLib

Code

package your.package.here;
@RezzedUp
RezzedUp / Javalin-in-Spigot-or-Bungee.md
Last active February 29, 2024 19:32
Guide - Using Javalin in a Spigot or Bungeecord Plugin

Using Javalin in a Spigot or Bungeecord Plugin

A common problem when attempting to use Javalin in a Spigot or Bungeecord plugin is the following:

[ERROR] java.lang.RuntimeException: javax.servlet.ServletException: java.lang.RuntimeException: Unable to load org.eclipse.jetty.websocket.server.WebSocketServerFactory
        ...
Caused by: java.lang.ClassNotFoundException: org.eclipse.jetty.websocket.server.WebSocketServerFactory

This is incredibly frustrating because as far as you can tell, you've included all of Javalin's dependencies properly. In fact, you're probably reading this guide right now because you yourself fell victim to these pesky errors. Don't get too fraught, the solution is right under your nose!

@PikaMug
PikaMug / LocaleQuery.class
Last active August 23, 2023 03:30
Show translated item/entity/etc. names in client's language
/*******************************************************************************************************
* MIT License
*
* Copyright (c) 2019 PikaMug
*
* 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
@yougg
yougg / proxy.md
Last active July 30, 2025 04:11
complete ways to set http/socks/ssh proxy environment variables

set http or socks proxy environment variables

# set http proxy
export http_proxy=http://PROXYHOST:PROXYPORT

# set http proxy with user and password
export http_proxy=http://USERNAME:PASSWORD@PROXYHOST:PROXYPORT

# set http proxy with user and password (with special characters)
@whizkydee
whizkydee / ffmpeg.md
Created July 17, 2018 12:17 — forked from protrolium/ffmpeg.md
using ffmpeg to extract audio from video files

ffmpeg

Converting Audio into Different Formats / Sample Rates

Minimal example: transcode from MP3 to WMA:
ffmpeg -i input.mp3 output.wma

You can get the list of supported formats with:
ffmpeg -formats

Convert WAV to MP3, mix down to mono (use 1 audio channel), set bit rate to 64 kbps and sample rate to 22050 Hz:

@musale
musale / remove.sh
Created June 20, 2017 14:46
Remove and re-install node on arch linux
sudo pacman -Rsc -n nodejs
sudo pacman -Sy nodejs
sudo pacman -Sy npm
@Jikoo
Jikoo / Experience.java
Last active May 16, 2025 15:34
A utility for managing experience with Bukkit.
package com.github.jikoo.planarwrappers.util;
import org.bukkit.entity.Player;
/**
* A utility for managing player experience.
*/
public final class Experience {
/**
@Techcable
Techcable / NameChanger.java
Last active September 29, 2022 07:11
Change the name of a player using protocollib
/*
* The MIT License
* Copyright (c) 2015 Techcable
*
* 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: