This file contains 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
{"name":"Primário","settings":"{\"settings\":\"{\\n \\\"workbench.colorTheme\\\": \\\"One Dark Pro\\\",\\n \\\"workbench.productIconTheme\\\": \\\"fluent-icons\\\",\\n \\\"workbench.iconTheme\\\": \\\"eq-material-theme-icons\\\",\\n \\\"emmet.syntaxProfiles\\\": {\\n \\\"javascript\\\": \\\"jsx\\\"\\n },\\n \\\"workbench.startupEditor\\\": \\\"newUntitledFile\\\",\\n \\\"editor.fontSize\\\": 16,\\n \\\"javascript.suggest.autoImports\\\": true,\\n \\\"javascript.updateImportsOnFileMove.enabled\\\": \\\"always\\\",\\n \\\"editor.rulers\\\": [\\n 80,\\n 120\\n ],\\n \\\"extensions.ignoreRecommendations\\\": true,\\n \\\"typescript.tsserver.log\\\": \\\"off\\\",\\n \\\"files.associations\\\": {\\n \\\".sequelizerc\\\": \\\"javascript\\\",\\n \\\".stylelintrc\\\": \\\"json\\\",\\n \\\"*.tsx\\\": \\\"typescriptreact\\\",\\n \\\".env.*\\\": \\\"dotenv\\\",\\n \\\".prettierrc\\\": \\\"json\\\"\\n },\\n \\\"screencastMode.onlyKeyboardShortcuts\\\": true,\\n \\\"cSpell.u |
This file contains 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 java.util.NavigableMap; | |
import java.util.Random; | |
import java.util.TreeMap; | |
public class RandomCollection<E> { | |
private final NavigableMap<Double, E> map = new TreeMap<>(); | |
private final Random random; | |
private double total = 0; |
This file contains 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 com.mojang.authlib.GameProfile; | |
import com.mojang.authlib.properties.Property; | |
import lombok.Getter; | |
import org.apache.commons.codec.binary.Base64; | |
import org.bukkit.ChatColor; | |
import org.bukkit.Material; | |
import org.bukkit.enchantments.Enchantment; | |
import org.bukkit.inventory.ItemFlag; | |
import org.bukkit.inventory.ItemStack; | |
import org.bukkit.inventory.meta.ItemMeta; |
This file contains 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); |