mirror of
https://github.com/SimplexDevelopment/FreedomNetworkSuite.git
synced 2025-06-26 19:44:27 +00:00
Upgrades
This commit is contained in:
42
Fossil/.gitignore
vendored
Normal file
42
Fossil/.gitignore
vendored
Normal file
@ -0,0 +1,42 @@
|
||||
.gradle
|
||||
build/
|
||||
!gradle/wrapper/gradle-wrapper.jar
|
||||
!**/src/main/**/build/
|
||||
!**/src/test/**/build/
|
||||
|
||||
### IntelliJ IDEA ###
|
||||
.idea/modules.xml
|
||||
.idea/jarRepositories.xml
|
||||
.idea/compiler.xml
|
||||
.idea/libraries/
|
||||
*.iws
|
||||
*.iml
|
||||
*.ipr
|
||||
out/
|
||||
!**/src/main/**/out/
|
||||
!**/src/test/**/out/
|
||||
|
||||
### Eclipse ###
|
||||
.apt_generated
|
||||
.classpath
|
||||
.factorypath
|
||||
.project
|
||||
.settings
|
||||
.springBeans
|
||||
.sts4-cache
|
||||
bin/
|
||||
!**/src/main/**/bin/
|
||||
!**/src/test/**/bin/
|
||||
|
||||
### NetBeans ###
|
||||
/nbproject/private/
|
||||
/nbbuild/
|
||||
/dist/
|
||||
/nbdist/
|
||||
/.nb-gradle/
|
||||
|
||||
### VS Code ###
|
||||
.vscode/
|
||||
|
||||
### Mac OS ###
|
||||
.DS_Store
|
21
Fossil/build.gradle
Normal file
21
Fossil/build.gradle
Normal file
@ -0,0 +1,21 @@
|
||||
plugins {
|
||||
id 'java'
|
||||
}
|
||||
|
||||
group = 'me.totalfreedom'
|
||||
version = '1.0.0'
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compileOnly project(":Patchwork")
|
||||
|
||||
testImplementation platform('org.junit:junit-bom:5.9.1')
|
||||
testImplementation 'org.junit.jupiter:junit-jupiter'
|
||||
}
|
||||
|
||||
test {
|
||||
useJUnitPlatform()
|
||||
}
|
16
Fossil/src/main/java/me/totalfreedom/fossil/Fossil.java
Normal file
16
Fossil/src/main/java/me/totalfreedom/fossil/Fossil.java
Normal file
@ -0,0 +1,16 @@
|
||||
package me.totalfreedom.fossil;
|
||||
|
||||
import me.totalfreedom.base.CommonsBase;
|
||||
import org.bukkit.plugin.java.JavaPlugin;
|
||||
|
||||
public class Fossil extends JavaPlugin
|
||||
{
|
||||
@Override
|
||||
public void onEnable()
|
||||
{
|
||||
CommonsBase.getInstance()
|
||||
.getRegistrations()
|
||||
.getModuleRegistry()
|
||||
.addModule(this);
|
||||
}
|
||||
}
|
@ -0,0 +1,36 @@
|
||||
package me.totalfreedom.fossil.command;
|
||||
|
||||
import me.totalfreedom.command.*;
|
||||
import me.totalfreedom.command.annotation.Base;
|
||||
import me.totalfreedom.command.annotation.Info;
|
||||
import me.totalfreedom.command.annotation.Permissive;
|
||||
import me.totalfreedom.command.annotation.Subcommand;
|
||||
import me.totalfreedom.fossil.Fossil;
|
||||
import net.kyori.adventure.text.Component;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
@Info(name = "kick", description = "Kick a player", usage = "/<command> <player>")
|
||||
@Permissive(perm = "fossil.kick")
|
||||
public class KickCommand extends CommandBase
|
||||
{
|
||||
public KickCommand(Fossil plugin) {
|
||||
super(plugin);
|
||||
}
|
||||
|
||||
@Base
|
||||
public void run(CommandSender sender) {
|
||||
sender.sendMessage(Component.text("You must specify a player to kick."));
|
||||
}
|
||||
|
||||
@Subcommand(permission = "fossil.kick", args = {Player.class, String.class})
|
||||
public void kickPlayer(Player player, String string) {
|
||||
player.kick(Component.text(string));
|
||||
}
|
||||
|
||||
// TODO: Write the code to make this work properly.
|
||||
@Subcommand(name = "info", permission = "fossil.kick.info", args = {Player.class})
|
||||
public void playerinfo(Player player) {
|
||||
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user