Skip to content

Instantly share code, notes, and snippets.

View nkomarn's full-sized avatar
🌸

mykyta nkomarn

🌸
View GitHub Profile
@nkomarn
nkomarn / regioncleaner.java
Created June 29, 2021 04:06
A tiny Java application to delete regions outside of a certain boundary; useful for deleting chunks generated illegally outside of a world border.
package com.firestartermc.regioncleaner;
import org.jetbrains.annotations.NotNull;
import java.io.File;
import java.text.NumberFormat;
import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;
# 📚 Firestarter Guide
Howdy! Welcome aboard to Firestarter, a friendly, community-focused Minecraft multiplayer realm! This guide will outline all of the things you need to know when playing on Firestarter!
# 🚩 Ground Rules
Something or other...
@nkomarn
nkomarn / launcher
Last active October 11, 2019 22:49
{
"version": "1.0.0",
"discord": {
"clientId": "630764465498882084",
"smallImageText": "Bonfire",
"smallImageKey": "bonfire"
},
"java": {
"oracle": "http://www.oracle.com/technetwork/java/javase/downloads/jre8-downloads-2133155.html"
},
### Keybase proof
I hereby claim:
* I am nkomarn on github.
* I am nkomarn (https://keybase.io/nkomarn) on keybase.
* I have a public key ASAwotmoUG6o6lWnUmMtljdMkgWSZCxelIZ2WHWBxhPPKAo
To claim this, I am signing this object:
@nkomarn
nkomarn / SendImage.java
Created March 24, 2019 21:02
Sample code that sends an image from a URL to the current channel in Discord JDA!
// Get channel name and send in current channel
String channelName = event.getChannel().getName();
event.getChannel().sendMessage(channelName).queue();
// Upload and send an image to current channel
try {
URL url = new URL("https://i.imgur.com/Jc4HEGN.jpg");
BufferedImage img = ImageIO.read(url);
File file = new File("temp.jpg"); // change the '.jpg' to whatever extension the image has
ImageIO.write(img, "jpg", file); // again, change 'jpg' to the correct extension
@nkomarn
nkomarn / ColorPicker.java
Created February 10, 2019 19:44
A simple and effective color picker tool for Discord JDA!
event.getChannel().sendTyping().complete();
Random random = new Random();
int nextInt = random.nextInt(0xffffff + 1);
try {
BufferedImage img = new BufferedImage(500, 500, BufferedImage.TYPE_INT_RGB);
Graphics graphics = img.getGraphics();
graphics.setColor(Color.decode(String.valueOf(nextInt)));
graphics.fillRect(0, 0, 500, 500);
graphics.dispose();