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 org.bukkit.Color; | |
import org.bukkit.Material; | |
import org.bukkit.inventory.ItemStack; | |
import org.bukkit.inventory.meta.ItemMeta; | |
import org.bukkit.inventory.meta.LeatherArmorMeta; | |
import org.bukkit.inventory.meta.SkullMeta; | |
import java.lang.reflect.Field; |
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
const dns = require('dns'); | |
const axios = require('axios'); | |
const api = axios.create({ baseURL: 'http://ip-api.com' }); | |
const dnsIp = 'netflix.com', | |
resetColor = '[0m', | |
bold = '[28m', | |
backgroundColor = '[7m', | |
pinkColor = '[35m', | |
cyanColor = '[96m', | |
prefix = resetColor + '[' + cyanColor + '+' + resetColor + '] ' + cyanColor + bold + backgroundColor; |
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
/** | |
* @author Yuhtin | |
* Github: https://github.com/Yuhtin | |
*/ | |
public class CaseInsensitiveExample { | |
static final CaseInsensitiveLinkedMap<Character> CHARACTER_MAP = CaseInsensitiveLinkedMap.newMap(); | |
public static void main(String[] args) { |
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 lombok.AccessLevel; | |
import lombok.NoArgsConstructor; | |
import net.md_5.bungee.api.chat.BaseComponent; | |
import net.md_5.bungee.api.chat.HoverEvent; | |
import net.md_5.bungee.api.chat.TextComponent; | |
import org.bukkit.Bukkit; | |
import org.bukkit.inventory.ItemStack; | |
import java.lang.reflect.Method; | |
import java.util.logging.Level; |
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 Conversor { | |
double value; | |
double price; | |
Conversor(double value, double price) { | |
this.value = value; | |
this.price = price; | |
} | |
double convert() { |
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 'package:flutter/material.dart'; | |
import 'jokenpo.dart'; | |
import 'jokenpoTypes.dart'; | |
class Homepage extends StatefulWidget { | |
Homepage({Key key, title: 'Home'}) : super(key: key); | |
@override | |
_HomepageState createState() => _HomepageState(); | |
} |
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
public final class MaterialUtils { | |
public static ItemStack convertFromLegacy(String materialName, int damage) { | |
try { | |
return new ItemStack(Material.getMaterial(materialName), 1, (short) damage); | |
} catch (Exception error) { | |
Material material = Material.valueOf("LEGACY_" + materialName); | |
return new ItemStack(Bukkit.getUnsafe().fromLegacy(new MaterialData(material, (byte) damage))); | |
} |
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
# This is the main configuration file for Bukkit. | |
# As you can see, there's actually not that much to configure without any plugins. | |
# For a reference for any variable inside this file, check out the Bukkit Wiki at | |
# http://wiki.bukkit.org/Bukkit.yml | |
# | |
# If you need help on this file, feel free to join us on irc or leave a message | |
# on the forums asking for advice. | |
# | |
# IRC: #spigot @ irc.spi.gt | |
# (If this means nothing to you, just go to http://www.spigotmc.org/pages/irc/ ) |
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
public Collection<Chunk> getNearbyChunksGrid(Location location) { | |
val offset = new int[]{-1, 0, 1}; | |
val world = location.getWorld(); | |
val baseX = location.getChunk().getX(); | |
val baseZ = location.getChunk().getZ(); | |
val chunksAroundPlayer = new HashSet<Chunk>(); | |
for (val x : offset) { | |
for (val z : offset) { |
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
public static void main(String[] args) { | |
Scanner scanner = new Scanner(System.in); | |
System.out.println("Enter the number of products:"); | |
int products = scanner.nextInt(); | |
List<Product> productsList = new ArrayList<>(); | |
for (int i = 1; i <= products; i++) { | |
System.out.println("Insert Product #" + i + " code:"); | |
int code = scanner.nextInt(); |
OlderNewer