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
| using System.Security.Cryptography; | |
| using System; | |
| using System.IO; | |
| using System.IO.Compression; | |
| using System.Net; | |
| using System.Net.Sockets; | |
| using System.Runtime.Serialization.Formatters.Binary; | |
| using System.Text; | |
| using System.Threading; |
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
| /* | |
| AUTHOR: Dev_Richard (https://www.spigotmc.org/members/dev_richard.38792/) | |
| DESC: A simple and easy to use class that can get and set a player's total experience points. | |
| Feel free to use this class in both public and private plugins, however if you release your | |
| plugin please link to this gist publicly so that others can contribute and benefit from it. | |
| */ | |
| import java.math.BigDecimal; | |
| import java.util.List; |
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 com.comphenix.test; | |
| import java.io.ByteArrayInputStream; | |
| import java.io.ByteArrayOutputStream; | |
| import java.io.DataInputStream; | |
| import java.io.DataOutputStream; | |
| import java.io.IOException; | |
| import java.io.InputStream; | |
| import java.io.InputStreamReader; | |
| import java.io.OutputStream; |
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 com.comphenix.example; | |
| import java.io.IOException; | |
| import java.io.InputStreamReader; | |
| import java.net.URL; | |
| import java.net.URLConnection; | |
| import java.util.Map; | |
| import java.util.UUID; | |
| import java.util.concurrent.ConcurrentMap; | |
| import java.util.concurrent.TimeUnit; |
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 com.comphenix.example; | |
| import java.awt.image.BufferedImage; | |
| import java.io.File; | |
| import java.io.IOException; | |
| import javax.imageio.ImageIO; | |
| import org.bukkit.ChatColor; | |
| import org.bukkit.command.Command; |
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 com.comphenix.example; | |
| import org.bukkit.Location; | |
| import org.bukkit.command.Command; | |
| import org.bukkit.command.CommandSender; | |
| import org.bukkit.entity.EntityType; | |
| import org.bukkit.entity.Player; | |
| import org.bukkit.event.Listener; | |
| import org.bukkit.plugin.java.JavaPlugin; |
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 com.comphenix.example; | |
| import java.util.Collection; | |
| import java.util.Iterator; | |
| import java.util.List; | |
| import java.util.ListIterator; | |
| import java.util.concurrent.Callable; | |
| import com.google.common.collect.Lists; |
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
| /** | |
| * Converts the player inventory to a String array of Base64 strings. First string is the content and second string is the armor. | |
| * | |
| * @param playerInventory to turn into an array of strings. | |
| * @return Array of strings: [ main content, armor content ] | |
| * @throws IllegalStateException | |
| */ | |
| public static String[] playerInventoryToBase64(PlayerInventory playerInventory) throws IllegalStateException { | |
| //get the main content part, this doesn't return the armor | |
| String content = toBase64(playerInventory); |
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 bash | |
| set -o errexit | |
| set -o nounset | |
| set -o pipefail | |
| # Automatically update your CloudFlare DNS record to the IP, Dynamic DNS | |
| # Can retrieve cloudflare Domain id and list zone's, because, lazy | |
| # Place at: | |
| # /usr/local/bin/cf-ddns.sh |
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 com.comphenix.example; | |
| import java.lang.reflect.Field; | |
| import java.lang.reflect.Method; | |
| import java.util.ArrayList; | |
| import java.util.EnumMap; | |
| import java.util.Iterator; | |
| import java.util.List; | |
| import org.bukkit.event.Cancellable; |