Skip to content

Instantly share code, notes, and snippets.

View Amejonah1200's full-sized avatar
🙃
Code, Eat, Code, Sleep, Repeat.

Amejonah1200

🙃
Code, Eat, Code, Sleep, Repeat.
  • In a Dimension, in a Cluster, in a Galaxy, in a Solar-System, on a Planet, at Microsoft, on a Server, in a GitHub-Repository
View GitHub Profile
### Keybase proof
I hereby claim:
* I am amejonah1200 on github.
* I am amejonah (https://keybase.io/amejonah) on keybase.
* I have a public key ASBWNk3AnJZdVEhXnFEj660MWe6gWpnGeJ1gJx0PjapKRQo
To claim this, I am signing this object:
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import java.util.Objects;
import java.util.function.*;
public class Result<T, E extends Throwable> {
private final T obj;
private final E error;
import org.jetbrains.annotations.NotNull;
import java.util.*;
import java.util.concurrent.ThreadLocalRandom;
import java.util.concurrent.atomic.AtomicInteger;
public class WeightedRandomEvents<A> {
private final Map<Integer, Consumer<A>> events;
@Amejonah1200
Amejonah1200 / VigenereCypher.java
Last active March 31, 2020 14:29
A VigenereCypher in Java, handling only with Alphabetical Letters and Spaces.
import java.util.Arrays;
import java.util.List;
public class VigenereCypher {
private static List<Character> alphabet = Arrays.asList('A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z');
public static void main(String[] args) {
System.out.println(alphabet.indexOf('X') + " " + alphabet.indexOf('K') + " " +alphabet.indexOf('H'));
System.out.println(encodeString("X", "K"));
import org.bukkit.entity.Player;
import com.github.intellectualsites.plotsquared.api.PlotAPI;
import com.github.intellectualsites.plotsquared.plot.object.Plot;
import com.github.intellectualsites.plotsquared.plot.object.PlotPlayer;
import net.minecraft.server.v1_8_R3.Material;
public static void setRand(Player player, Material material) {
PlotPlayer plotPlayer = new PlotAPI().wrapPlayer(player.getUniqueId());
Plot plot = plotPlayer.getCurrentPlot();
if (plot == null) return;
@Amejonah1200
Amejonah1200 / HowToOpen.java
Last active July 9, 2019 19:06
Menu-System Konzept, tested
//HowToOpen first Menu
MenuRegistery#open(null, new OneMenu((Player) arg0, getMenuRegistery()));
@Amejonah1200
Amejonah1200 / psbordersetold.java
Last active December 1, 2019 19:46
PlotSquared: Set the border of a plot.
// 1.12.2 and lower
type -> Material
id -> SubID
Plot#setComponent("border", com.intellectualcrafters.plot.config.Configuration.BLOCKLIST.parseString(type.toString() + ":" + id));
// 1.13.2 and higher
type -> Material
Plot#setComponent("border", com.intellectualcrafters.plot.config.Configuration.BLOCKLIST.parseString(type.toString()));