This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * The MIT License | |
| * Copyright (c) 2014-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: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # The type of the server: spigot, bukkit, paper, taco | |
| SERVER_BRAND=taco | |
| # The minecraft version | |
| SERVER_VERSION=1.8.8 | |
| # The amount of memory you want the server to use | |
| TARGET_MEMORY=512M | |
| # The maximum amount of memory the server is allowed to use |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public UserData getUser(UUID userId) { | |
| if (getUsers().containsKey(userId)) { | |
| return getUsers().get(userId); | |
| } | |
| // No user account found so create a new one. | |
| UserData newUser = createUser(userId); | |
| return newUser; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package net.techcable.tacoray.utils; | |
| import lombok.*; | |
| import java.util.ArrayList; | |
| import java.util.List; | |
| import java.util.function.Consumer; | |
| import com.google.common.base.Function; | |
| import com.google.common.base.Preconditions; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package net.techcable.bungeegroups.bukkit.platform; | |
| import lombok.*; | |
| import java.lang.reflect.InvocationTargetException; | |
| import java.lang.reflect.Method; | |
| import java.util.Collection; | |
| import java.util.HashMap; | |
| import java.util.Map; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/python3 | |
| import argparse | |
| import os | |
| import difflib | |
| import util | |
| parser = argparse.ArgumentParser("Generate patches to the MCP sources") | |
| parser.add_argument('-mcp', help = 'The original mcp sources', default = 'mcp/src/minecraft_server') | |
| parser.add_argument('-out', help = 'Where to place the generated patches', default = 'patches') | |
| parser.add_argument('src', nargs = '?', help = 'The modified sources', default = 'src/main/java') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import argparse | |
| import os | |
| import re | |
| parser = argparse.ArgumentParser("Convert line endings to \\n") | |
| parser.add_argument('--excluded', help='Patterns of files or directories to exclude', nargs='*') | |
| parser.add_argument('--quiet', '-q', help='Suppress non-error output', action='store_true') | |
| parser.add_argument('input', nargs='+', help='Files or directories to convert line endings in') | |
| args = parser.parse_args() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // CraftBukkit start | |
| public static int executeCommand(ICommandSender sender, CommandSender bukkitSender, String rawCommand) { | |
| CraftServer server = (CraftServer) bukkitSender.getServer(); | |
| SimpleCommandMap commandMap = server.getCommandMap(); | |
| Joiner joiner = Joiner.on(" "); | |
| if (rawCommand.startsWith("/")) rawCommand = rawCommand.substring(1); | |
| String[] command = rawCommand.split(" "); | |
| String commandName = command[0]; | |
| if (commandName.startsWith("minecraft:")) commandName = commandName.substring("minecraft:".length()); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <stdbool.h> | |
| #include <stdio.h> | |
| #include <math.h> | |
| #define SQRT_THRESHOLD 1000 | |
| #define MIN(X, Y) (((X) < (Y)) ? (X) : (Y)) | |
| bool isPrime(int num) { | |
| if (num == 1 || num == 2 || num % 2 == 0) return false; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python3 | |
| import os | |
| import sys | |
| from os import path | |
| import shutil | |
| from subprocess import run, DEVNULL | |
| from zipfile import ZipFile | |
| # pip install PyYAML | |
| import yaml |