Spigot added a feature allowing for server to automatically restart on crashes,
as well as when authorized user executes /restart
command.
Here is the best setup (I think so :D) for K-series Keychron keyboards on Linux.
Note: many newer Keychron keyboards use QMK as firmware and most tips here do not apply to them. Maybe the ones related to Bluetooth can be useful, but everything related to Apple's keyboard module (hid_apple
) on Linux, won't work. As far as I know, all QMK-based boards use the hid_generic
module instead. Examples of QMK-based boards are: Q, Q-Pro, V, K-Pro, etc.
Most of these commands have been tested on Ubuntu 20.04 and should also work on most Debian-based distributions. If a command happens not to work for you, take a look in the comment section.
Older Keychron keyboards (those not based on QMK) use the hid_apple
driver on Linux, even in the Windows/Android mode, both in Bluetooth and Wired modes.
// Comment the line below in if you use compatre | |
//import com.github.johnnyjayjay.compatre.NmsDependent; | |
import net.minecraft.server.v1_8_R3.MojangsonParser; | |
import net.minecraft.server.v1_8_R3.NBTTagCompound; | |
import org.bukkit.Bukkit; | |
import org.bukkit.Material; | |
import org.bukkit.craftbukkit.v1_8_R3.inventory.CraftItemStack; | |
import org.bukkit.inventory.ItemStack; |
const generateAccesskey = (method, password, ip, port) => { | |
const firstPart = btoa(`${method.toLowerCase()}:${password}`) | |
const secondPart = `${ip}:${port}` | |
const accesskey = `ss://${firstPart}@${secondPart}` | |
return accesskey | |
} |
/** | |
* Converts the player inventory to a String array of Base64 strings. First string is the content and second string is the armor. | |
* | |
* @param playerInventory to turn into an array of strings. | |
* @return Array of strings: [ main content, armor content ] | |
* @throws IllegalStateException | |
*/ | |
public static String[] playerInventoryToBase64(PlayerInventory playerInventory) throws IllegalStateException { | |
//get the main content part, this doesn't return the armor | |
String content = toBase64(playerInventory); |