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
| // The following license should allow reuse, redistribution, with or without edits and with or without attribution. | |
| // Do what you want with it! | |
| /* | |
| * The MIT License (MIT) | |
| * | |
| * Copyright (c) 2018 MrBlobman | |
| * | |
| * Permission is hereby granted, free of charge, to any person obtaining a copy | |
| * of this software and associated documentation files (the "Software"), to deal |
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
| // Implementation in ES6 | |
| function pagination(c, m) { | |
| var current = c, | |
| last = m, | |
| delta = 2, | |
| left = current - delta, | |
| right = current + delta + 1, | |
| range = [], | |
| rangeWithDots = [], | |
| l; |
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 java.lang.reflect.Constructor; | |
| import java.lang.reflect.Field; | |
| import java.lang.reflect.Method; | |
| import org.bukkit.Bukkit; | |
| import org.bukkit.entity.Player; | |
| import org.bukkit.inventory.Inventory; | |
| import static com.google.common.base.Preconditions.checkNotNull; |
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
| /** | |
| * Represents an axix-aligned bounding box. | |
| * | |
| * @author Kristian | |
| */ | |
| public class AABB { | |
| public static class Vec3D { | |
| /** | |
| * Point with the coordinate (1, 1, 1). | |
| */ |