Skip to content

Instantly share code, notes, and snippets.

View masecla22's full-sized avatar
💭
chaotically proportional

masecla22 masecla22

💭
chaotically proportional
View GitHub Profile
@masecla22
masecla22 / py
Created March 30, 2018 15:57
Simple REQ
# If you know the host and port, you may skip this and use MinecraftServer("example.org", 1234)
server = MinecraftServer("doge.bitquest.co",25565)
# 'status' is supported by all Minecraft servers that are version 1.7 or higher.
status = server.status()
print("The server has {0} players and replied in {1} ms".format(status.players.online, status.latency))
# 'ping' is supported by all Minecraft servers that are version 1.7 or higher.
# It is included in a 'status' call, but is exposed separate if you do not require the additional info.
latency = server.ping()
print("The server replied in {0} ms".format(latency))
# 'query' has to be enabled in a servers' server.properties file.
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <MsgBoxConstants.au3>
#include <EditConstants.au3>
#include <Array.au3>
#include <Inet.au3>
Func FileSelector()
Local Const $sMessage = "Choose a PATH to install the libraries to"
public static void update(Player who) {
LiteBoardAPI.toggleScoreboard(who, false);
List<String> scoreboardLines = new ArrayList<String>();
List<String> ltr = new ArrayList<String>();
List<Player> players = getOrderedPlayers();
// Generate the lines from the config
for (int i = 1; i <= 15; i++) {
scoreboardLines
.add(globals.mains.getConfig().getString("scoreboard.lines.line" + Integer.toString(i) + "-text"));
@masecla22
masecla22 / ItemStackSerializer.java
Created August 15, 2018 06:02
A class for converting bukkit ItemStack and ItemStacksArrays to Strings and back
package masecla.practicepvp.serializers;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import org.bukkit.inventory.ItemStack;
public class ItemStackSerializer {