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
package us.universalpvp.play; | |
import java.util.logging.Logger | |
import org.bukkit.Bukkit; | |
import org.bukkit.ChatColor; | |
import org.bukkit.Material; | |
import org.bukkit.command.Command; | |
import org.bukkit.command.CommandSender; | |
import org.bukkit.entity.Player; | |
import org.bukkit.inventory.ItemStack; |
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
package us.universalpvp.play; | |
import java.util.logging.Logger; | |
import org.bukkit.Bukkit; | |
import org.bukkit.Material; | |
import org.bukkit.command.Command; | |
import org.bukkit.command.CommandSender; |
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
package us.universalpvp.pp.managers; | |
import java.util.ArrayList; | |
import org.bukkit.Bukkit; | |
import org.bukkit.configuration.ConfigurationSection; | |
import org.bukkit.entity.Player; | |
public class Groups { |
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
/* | |
Example: | |
new BukkitRunnable() | |
{ | |
Scroller scroller = new Scroller("&aThis is an &2important &amessage!", 16, 5, '&'); | |
Sign sign = a-sign-from-somewhere; | |
public void run() | |
{ |
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
package furyrider.minigame.survivalgames.handlers; | |
public enum GameState | |
{ | |
IN_LOBBY, IN_GAME, PRE_GAME, PRE_DM, DM, RESETTING, POST_DM; | |
private static GameState state; | |
public static void setState(GameState state) | |
{ |
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
package us.universalpvp.skinpainter.util; | |
import org.bukkit.DyeColor; | |
import org.bukkit.Material; | |
import org.bukkit.inventory.ItemStack; | |
/** | |
* Created by avigh on 9/1/2016. | |
*/ | |
public enum ColoredMaterial { |
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
class ClosureSleeve { | |
let closure: () -> () | |
init(attachTo: AnyObject, closure: @escaping () -> ()) { | |
self.closure = closure | |
objc_setAssociatedObject(attachTo, "[\(arc4random())]", self, .OBJC_ASSOCIATION_RETAIN) | |
} | |
@objc func invoke() { | |
closure() |
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 framework.Command | |
import framework.CommandCanister | |
import framework.CommandHandler | |
import framework.CommandRegister | |
import org.apache.commons.lang3.StringUtils | |
class ExampleCommand { | |
@Command("/math") fun math(canister: CommandCanister) { |
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
package com.avighnash.exercises | |
object AdditivePersistence { | |
fun calc(num: Long): Int { | |
var x = num | |
var i = 0 | |
while (x.toString().toCharArray().map(Character::getNumericValue).size != 1) { | |
x = x.toString().toCharArray().map(Character::getNumericValue).sum().toLong() | |
i++ |
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
func calc(of num: String, _ loops: Int = 0) -> Int { | |
return num.count != 1 ? calc(of: String(num.compactMap({ Int(String($0)) }).reduce(0, +)), loops + 1) : loops | |
} |
OlderNewer