Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c85f5ac90d | ||
|
|
cff970885d | ||
| 94d2845077 | |||
| cfd0de04d7 | |||
| 7873dcc16b | |||
| 85ac3a0355 |
26
README.md
26
README.md
@@ -23,4 +23,28 @@ You can kill players with many different method, for example with an explosion o
|
|||||||
## Installation
|
## Installation
|
||||||
1. Download **AdvancedKill_Paper_x.xx.jar** and copy it into the *plugins* directory from your server.
|
1. Download **AdvancedKill_Paper_x.xx.jar** and copy it into the *plugins* directory from your server.
|
||||||
|
|
||||||
2. Restart the server
|
2. Restart the server
|
||||||
|
|
||||||
|
## Filter
|
||||||
|
The AdvancedKill Plugin has a filter for players. If a player is add to the filter, nobody can kill him with akill.
|
||||||
|
|
||||||
|
### Add a player
|
||||||
|
To add a player, run
|
||||||
|
```
|
||||||
|
/afilter <player>
|
||||||
|
```
|
||||||
|
### Remove a player
|
||||||
|
To remoce a player, run
|
||||||
|
```
|
||||||
|
/afilter <player>
|
||||||
|
```
|
||||||
|
|
||||||
|
### List players
|
||||||
|
To list all players in the filter, run
|
||||||
|
```
|
||||||
|
/afiler
|
||||||
|
```
|
||||||
|
|
||||||
|
### Turn filter on and off
|
||||||
|
To turn the filter on and off, open `config.yml`. You can find the config.yml in `plugins/AdvancedKill`
|
||||||
|
Open it and set `filter-player` to `true`or `false`
|
||||||
@@ -19,10 +19,7 @@ public final class AdvancedKill extends JavaPlugin {
|
|||||||
saveDefaultConfig();
|
saveDefaultConfig();
|
||||||
|
|
||||||
getCommand("akill").setExecutor(this);
|
getCommand("akill").setExecutor(this);
|
||||||
|
getCommand("afilter").setExecutor(new AdvancedKillFilter(this));
|
||||||
if (getConfig().getBoolean("filter-player")) {
|
|
||||||
getCommand("afilter").setExecutor(new AdvancedKillFilter(this));
|
|
||||||
}
|
|
||||||
|
|
||||||
getLogger().info("AdvancedKill was loaded!");
|
getLogger().info("AdvancedKill was loaded!");
|
||||||
}
|
}
|
||||||
@@ -62,15 +59,19 @@ public final class AdvancedKill extends JavaPlugin {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//Check filter
|
//Check filter
|
||||||
List<String> filter = getConfig().getStringList("bypass-players");
|
if (getConfig().getBoolean("filter-player")) {
|
||||||
|
List<String> filter = getConfig().getStringList("bypass-players");
|
||||||
|
|
||||||
String uuid = target.getUniqueId().toString();
|
String uuid = target.getUniqueId().toString();
|
||||||
|
|
||||||
if (filter.contains(uuid)) {
|
if (filter.contains(uuid)) {
|
||||||
sender.sendMessage("§cYou can not kill this player!");
|
sender.sendMessage("§cYou can not kill this player!");
|
||||||
return true;
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//Run Commands
|
//Run Commands
|
||||||
switch (mode) {
|
switch (mode) {
|
||||||
case "lightning":
|
case "lightning":
|
||||||
|
|||||||
@@ -21,6 +21,20 @@ public class AdvancedKillFilter implements CommandExecutor {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!(plugin.getConfig().getBoolean("filter-player"))) {
|
||||||
|
sender.sendMessage("§cThe filter is not aktive.");
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
List<String> players = plugin.getConfig().getStringList("bypass-players");
|
||||||
|
|
||||||
|
if (!(args.length == 1)) {
|
||||||
|
sender.sendMessage("No Player defined");
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
String msg = "";
|
||||||
|
|
||||||
Player target = Bukkit.getPlayer(args[0]);
|
Player target = Bukkit.getPlayer(args[0]);
|
||||||
|
|
||||||
if (target == null) {
|
if (target == null) {
|
||||||
@@ -30,10 +44,6 @@ public class AdvancedKillFilter implements CommandExecutor {
|
|||||||
|
|
||||||
String uuid = target.getUniqueId().toString();
|
String uuid = target.getUniqueId().toString();
|
||||||
|
|
||||||
List<String> players = plugin.getConfig().getStringList("bypass-players");
|
|
||||||
|
|
||||||
String msg = "";
|
|
||||||
|
|
||||||
if (players.contains(uuid)) {
|
if (players.contains(uuid)) {
|
||||||
players.remove(uuid);
|
players.remove(uuid);
|
||||||
msg = "§aPlayer was removed successfully!";
|
msg = "§aPlayer was removed successfully!";
|
||||||
|
|||||||
Reference in New Issue
Block a user