Skip to content

Instantly share code, notes, and snippets.

View JustBru00's full-sized avatar

Justin Brubaker JustBru00

View GitHub Profile
@stonar96
stonar96 / Anti-Xray.md
Last active March 4, 2024 15:16
Recommended Paper Anti-Xray settings by stonar96

❗ This has been moved to the official PaperMC docs ❗

Link: https://docs.papermc.io/paper/anti-xray

Help: https://discord.gg/papermc






Recommended Paper Anti-Xray settings by stonar96

General

Anti-Xray can be configured per world in the paper.yml configuration file. To understand how per world configuration works please read this first. Note that after changing any settings for Anti-Xray you have to restart your server. Executing the /reload command (you should never do this) won't apply the settings to worlds that are already loaded.

import org.bukkit.Material;
import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.meta.ItemMeta;
/*
* You know, it's pretty interesting.
* The most recent spigot update (1.13+) has changed all of the Material values.
* They changed it so that it matches the vanilla display name of the items!
* This makes formatting the item names very easy.
*/
package net.swedz.util.render;
import java.awt.BasicStroke;
import java.awt.Color;
import java.awt.Graphics2D;
import java.awt.Stroke;
public class Rendering {
public static void rectangle(Graphics2D g, int x, int y, int w, int h, int thickness, Color color) {
Color old = g.getColor();
@iluxonchik
iluxonchik / jwplayer_downloader.py
Created December 14, 2017 08:38
Download JWPlayer .ts files, merge them into a single file and then convert the file to .mp4
"""
For my Neuroengineering course presentation my group wanted to download some videos,
the problem is that those videos were played by the JWPlayer, so obtaining the video
files was a little tricky. What I noticed from observing the network traffic is that
JWPlayer downloads the video files in chunks (each chunk was 4 seconds long) and
in .ts format. My goal was to combine all of those small video segments into a single
one and then convert the file to .mp4. To combine the multiple video chunks into one
I used the "cat" command and to convert resulting .ts file to .mp4 I used the "ffmpeg"
tool.

Keybase proof

I hereby claim:

  • I am JustBru00 on github.
  • I am justbru00 (https://keybase.io/justbru00) on keybase.
  • I have a public key whose fingerprint is 8B70 FE50 B5E2 3D8D 0899 2811 807C A64D 6692 CBEF

To claim this, I am signing this object:

@serega6531
serega6531 / NoFlashPacket.java
Last active October 25, 2022 08:18
A simple based on ProtocolLib no-flashing scoreboard manager with rows up to 32 chars
import com.comphenix.packetwrapper.WrapperPlayServerScoreboardTeam;
import com.comphenix.protocol.PacketType;
import com.comphenix.protocol.ProtocolLibrary;
import com.comphenix.protocol.events.PacketAdapter;
import com.comphenix.protocol.events.PacketContainer;
import com.comphenix.protocol.events.PacketEvent;
import com.comphenix.protocol.wrappers.EnumWrappers;
import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.entity.Player;

Syntax

All target selectors start with @. The following character is the selector type. For example, @p means 'closest player'.

Target selectors may have additional, optional arguments. You can specify these in [ ], using the syntax a=0. For example, @p[a=0,b=5,c=-500].

There is a special short syntax for just specifying x, y, z and r arguments; simply list their values separated by a comma, without x=. For example: @p[100,64,-100,5] for 5 range, x=100, y=64 and z=-100. Each of these are optional and skippable by leaving them empty. For example, to just specify y coordinate: @p[,64].

Global Arguments:

(Case sensitive)

  • x - X coordinate for search center. Default is senders coordinate, or 0.
@melihmucuk
melihmucuk / Util.java
Last active September 16, 2017 03:24
Getting JSON data over SSL on Android
public class Util {
static JSONObject jObj = null;
static String json = "";
public Util(){}
public JSONObject GetJSON(String URL) throws JSONException{
try {
@Zidkon
Zidkon / TeleportFixThree.java
Created September 25, 2012 01:33
Quick Fix to aadnk TeleportFixTwo
package com.comphenix.example;
import java.util.ArrayList;
import java.util.List;
import org.bukkit.Server;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import org.bukkit.event.Listener;