Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
dev.kotx:flylib-reloaded
Advanced tools
An utility library for Minecraft Paper that provides commands, menus, Kotlin extensions, and more.
FlyLib Reloaded is a utility library for Minecraft Paper that provides commands, menus, Kotlin extensions, and more.
⚠️This library is currently under development (beta version is 0.*.*
), and the API will be changed or removed
without notice.
You can implement tab completion, type checking, help message generation, and subcommands with the following simple code without writing plugin.yml.
Kotlin:
class TestPlugin : JavaPlugin() {
init {
//FlyLib entrypoint. Must place in onEnable or Plugin Constructor
flyLib {
command(ExplodeCommand())
listen(BlockBreakEvent::class.java) { event ->
//block break event logic
}
}
}
}
/**
* /explode <targets (players)> <power (integer)> <mode (one or two)>
*/
class ExplodeCommand : Command("explode") {
init {
usage {
//add typed arguments
entityArgument("targets")
integerArgument("power", min = 1, max = 10)
selectionArgument("mode", "one", "two")
executes {
message("You executed explode command!")
}
}
}
}
Java:
public class TestPlugin extends JavaPlugin {
@Override
public void onEnable() {
//FlyLib entrypoint. Must place in onEnable or Plugin Constructor
FlyLibKt.flyLib(this, flyLib -> {
flyLib.command(new ExplodeCommand());
flyLib.listen(BlockBreakEvent.class, event -> {
//block break event logic
});
});
}
}
/**
* /explode <targets (players)> <power (integer)> <mode (one or two)>
*/
class ExplodeCommand extends Command {
public ExplodeCommand() {
super("explode");
usage(usage -> {
//add typed arguments
usage.entityArgument("targets");
usage.integerArgument("power", 1, 10);
usage.selectionArgument("mode", "one", "two");
usage.executes(context -> context.message("You executed explode command!"));
});
}
}
Replace [version]
with the version you want to use.
Please add the following configs to your build.gradle.kts
.
Use the shadowJar
task when building plugins (generating jars to put in plugins/).
plugins {
id("com.github.johnrengelman.shadow") version "6.0.0"
}
dependencies {
implementation("dev.kotx:flylib-reloaded:[version]")
}
The following code is a configuration of shadowJar that combines all dependencies into one jar.
It relocates all classes under the project's groupId to avoid conflicts that can occur when multiple plugins using
different versions of flylib are deployed to the server.
By setting the following, the contents of the jar file will look like this
import com.github.jengelman.gradle.plugins.shadow.tasks.ConfigureShadowRelocation
//some gradle configurations
val relocateShadow by tasks.registering(ConfigureShadowRelocation::class) {
target = tasks.shadowJar.get()
prefix = project.group.toString()
}
tasks.shadowJar {
dependsOn(relocateShadow)
}
plugins {
id 'com.github.johnrengelman.shadow' version '6.0.0'
}
dependencies {
implementation 'dev.kotx:flylib-reloaded:[version]'
}
The following code is a configuration of shadowJar that combines all dependencies into one jar.
It relocates all classes under the project's groupId to avoid conflicts that can occur when multiple plugins using
different versions of flylib are deployed to the server.
By setting the following, the contents of the jar file will look like this
import com.github.jengelman.gradle.plugins.shadow.tasks.ConfigureShadowRelocation
//some gradle configurations
task relocateShadow(type: ConfigureShadowRelocation) {
target = tasks.shadowJar
prefix = project.group
}
tasks.shadowJar.dependsOn tasks.relocateShadow
Add the following dependencies and add them to the jar file with maven-shade-plugin
etc. when building the plugin.
<dependency>
<group>dev.kotx</group>
<name>flylib-reloaded</name>
<version>[version]</version>
</dependency>
FAQs
An utility library for Minecraft Paper that provides commands, menus, Kotlin extensions, and more.
We found that dev.kotx:flylib-reloaded demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.