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
const value = prompt("Input required") | |
const base = prompt("Base required") | |
const adapters = { 16: { "A": 10, "B": 11, "C": 12, "D": 13, "E": 14, "F": 15 } } | |
const formula = value | |
.split("") | |
.reverse() | |
.map((item, index) => `${(adapters[base] || {})[item] || item} * ${base} ^ ${index}`) | |
.reverse() | |
.join(" + "); |
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 class Tag { | |
private final Scoreboard scoreboard = new Scoreboard(); //you can use one for the nametag, no need to create other | |
public ScoreboardTeam getOrCreateNewTeam(String name) { | |
final ScoreboardTeam team = scoreboard.getTeam(name); | |
return team != null | |
? team | |
: scoreboard.createTeam(name); | |
} |
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 lombok.NonNull; | |
import net.minecraft.server.v1_8_R3.NBTTagCompound; | |
import org.bukkit.Bukkit; | |
import org.bukkit.FireworkEffect; | |
import org.bukkit.Material; | |
import org.bukkit.craftbukkit.v1_8_R3.inventory.CraftItemStack; | |
import org.bukkit.enchantments.Enchantment; | |
import org.bukkit.entity.Player; | |
import org.bukkit.inventory.ItemFlag; | |
import org.bukkit.inventory.ItemStack; |
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.github.zkingboos.util; | |
import lombok.NonNull; | |
import org.bukkit.Bukkit; | |
import org.bukkit.plugin.Plugin; | |
public abstract class ReutilizableTask implements Runnable { | |
private int taskId; |
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 final class DelayCommandExecutor implements CommandExecutor { | |
private final DelayService delayService = new DelayService(); | |
@Override | |
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) { | |
final Player player = (Player) sender; | |
if(delayService.isPlayerInDelay(player)) { | |
final int remainPlayerDelay = delayService.getRemainPlayerDelay(player); |
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 class DelayCommandExecutor implements CommandExecutor { | |
private final List<String> delayPlayerRegistry = new ArrayList<>(); | |
@Override | |
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) { | |
return true; | |
} | |
public String getPlayerDelayFromRegistry(Player player) { |
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
# This is a basic workflow to help you get started with Actions | |
name: 'maven-workflow' | |
on: | |
push: | |
branches: [ master ] | |
jobs: | |
build: |
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
FROM gitpod/workspace-full | |
USER root | |
ARG DEBIAN_FRONTEND=noninteractive | |
RUN curl -fsSL https://download.docker.com/linux/debian/gpg | sudo apt-key add - \ | |
&& add-apt-repository -y "deb [arch=amd64] https://download.docker.com/linux/ubuntu \ | |
xenial \ |
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
typealias TableConsumer = Player.() -> String | |
class Table( | |
private val title: String = "Unknown" | |
) { | |
private val lines = mutableListOf<TableLine>() | |
fun setLine(line: Int, text: String) = lines.add(TableLine(line, text, null)) | |
fun setLine(line: Int, c: TableConsumer) = lines.add(TableLine(line, null, c)) |
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 astral.zking.website.lib | |
import astral.zking.website.lib.DateType.* | |
import java.text.SimpleDateFormat | |
import java.util.* | |
val days = listOf("domingo", "segunda-feira", "terça-feira", "quarta-feira", "quinta-feira", "sexta-feira", "sábado") | |
val months = listOf("janeiro", "fevereiro", "março", "abril", "maio", "junho", "julho", "agosto", "setembro", "outubro", "novembro", "dezembro") | |
enum class DateType(val value: Int, val startString: String, vararg val partial: String){ |
NewerOlder