Skocz do zawartości
  • 👋 Witaj na MPCForum!

    Przeglądasz forum jako gość, co oznacza, że wiele świetnych funkcji jest jeszcze przed Tobą! 😎

    • Pełny dostęp do działów i ukrytych treści
    • Możliwość pisania i odpowiadania w tematach
    • System prywatnych wiadomości
    • Zbieranie reputacji i rozwijanie swojego profilu
    • Członkostwo w jednej z największych społeczności graczy

    👉 Dołączenie zajmie Ci mniej niż minutę – a zyskasz znacznie więcej!

    Zarejestruj się teraz

[3 Dni] DejVx


Oldis

Rekomendowane odpowiedzi

Opublikowano

Plagiat płatnego pluginu.

Kod właściwy:

 

 

public class AuraCommand implements CommandExecutor

{

private Aura plugin;

 

public AuraCommand(final Aura plugin) {

this.plugin = plugin;

}

 

public boolean onCommand(final CommandSender sender, final Command command, final String label, final String[] args) {

if (command.getName().equalsIgnoreCase("aura")) {

boolean invaildArg = false;

if (args.length > 0) {

final String cmd = args[0].toLowerCase();

if (cmd.equalsIgnoreCase("pomoc")) {

sender.sendMessage(this.plugin.addColour("&e» &a/aura list&3 - &eLista podaejrzanych graczy."));

sender.sendMessage(this.plugin.addColour("&e» &a/aura test <gracz>&3 - &eSprawdza czy ma aure."));

sender.sendMessage(this.plugin.addColour("&e» &a/aura spr <gracz> <limit-ataku>&3 - &eSprawdza czy ma aure z limitem botow."));

return true;

}

if (cmd.startsWith("list")) {

if (!sender.hasPermission("aura.list")) {

sender.sendMessage(this.plugin.addColour("&e» &cBrak uprawnien. &7(aura.list)"));

return true;

}

if (this.plugin.recentPlayers.size() > 0) {

sender.sendMessage(this.plugin.addColour("&e» &aPodajrzani gracze:"));

for (final Map.Entry<String, Integer> e : this.plugin.recentPlayers.entrySet()) {

final int attacks = e.getValue();

String banned = "";

if (this.plugin.autoBanLimit > 0 && attacks >= this.plugin.autoBanLimit) {

banned = "&c[banned] ";

}

sender.sendMessage(this.plugin.addColour(String.valueOf(banned) + e.getKey() + " &azaatakowal &e" + attacks + "boty/ow"));

}

return true;

}

sender.sendMessage(this.plugin.addColour("&e» &cBrak danych z ostatniego restartu."));

return true;

}

else if (cmd.startsWith("usun")) {

if (!sender.hasPermission("aura.usun")) {

sender.sendMessage(this.plugin.addColour("&e» &cBrak uprawnien. &7(aura.usun)"));

return true;

}

this.plugin.removeAllTestEntities();

sender.sendMessage(this.plugin.addColour("&e» &aWszystkie boty zostaly usuniete."));

return true;

}

else if (cmd.startsWith("test")) {

if (!sender.hasPermission("aura.testgraczy")) {

sender.sendMessage(this.plugin.addColour("&e» &cBrak uprawnien. &7(aura.testgraczy)"));

return true;

}

if (args.length <= 1 || args[1] == null) {

sender.sendMessage(this.plugin.addColour("&cInvalid arguments, try &a/aj test <player>"));

invaildArg = true;

return true;

}

Player player = null;

player = Bukkit.getServer().getPlayerExact(args[1]);

if (player != null) {

player.setTicksLived(1);

this.plugin.resetTemp(player.getName());

this.plugin.spawnTestEntity(player);

sender.sendMessage(this.plugin.addColour("&e» &aSprawdzanie gracza: &e" + player.getName() + "&atrwa..."));

return true;

}

sender.sendMessage(this.plugin.addColour("&e» &cNie znaleziono gracza."));

return true;

}

else if (cmd.startsWith("spr")) {

if (!sender.hasPermission("aura.spr")) {

sender.sendMessage(this.plugin.addColour("&e» &cBrak uprawnien. &7(aura.spr)"));

return true;

}

if (args.length <= 2 || args[1] == null || args[2] == null) {

sender.sendMessage(this.plugin.addColour("&e» &aPoprawne uzwycie: &e&l/aura spr <gracz> <limit-ataku>"));

invaildArg = true;

return true;

}

final String pName = args[1];

final int tempLimit = Integer.parseInt(args[2]);

if (tempLimit > 0) {

if (this.plugin.tempRecent.containsKey(pName)) {

sender.sendMessage(this.plugin.addColour(this.plugin.alertMsg.replace("%p", pName).replace("%t", String.valueOf(this.plugin.attackTime)).replace("%a", String.valueOf(this.plugin.tempRecent.get(pName)))));

if (this.plugin.tempRecent.get(pName) >= tempLimit) {

Bukkit.dispatchCommand((CommandSender)Bukkit.getConsoleSender(), this.plugin.autoBanCMD.replace("%p", pName));

}

}

return true;

}

sender.sendMessage(this.plugin.addColour("&e» &aPoprawne uzwycie: &e&l/aura spr <gracz> <limit-ataku>"));

return true;

}

else if (!invaildArg) {

sender.sendMessage(this.plugin.addColour("&e» &aLista komend: &e&l/aura pomoc"));

}

}

else {

sender.sendMessage(this.plugin.addColour("&e» &aAby uzyskac pomoc &e&l/aura pomoc"));

}

return true;

}

return true;

}

}

 

 

 

 

Kod owego pluginu:

 

 

 

public class AuraCommand implements CommandExecutor

{

private Aura plugin;

 

public AuraCommand(final Aura plugin) {

this.plugin = plugin;

}

 

public boolean onCommand(final CommandSender sender, final Command command, final String label, final String[] args) {

if (command.getName().equalsIgnoreCase("aura")) {

boolean invaildArg = false;

if (args.length > 0) {

final String cmd = args[0].toLowerCase();

if (cmd.equalsIgnoreCase("help")) {

sender.sendMessage(this.plugin.addColour("&6Komendy pluginu xAntyAura:"));

sender.sendMessage(this.plugin.addColour("&8# &7/aura list - &eLista podaejrzanych graczy."));

sender.sendMessage(this.plugin.addColour("&8# &7/aura test <gracz> - &eSprawdza czy ma aure."));

sender.sendMessage(this.plugin.addColour("&8# &7/aura spr <gracz> <limit-ataku> - &eSprawdza gracza czy ma aure z limitem botow /wkrotce"));

return true;

}

if (cmd.startsWith("list")) {

if (!sender.hasPermission("xaura.list")) {

sender.sendMessage(this.plugin.addColour("&8# &7Brak uprawnien. &c(xaura.list)"));

return true;

}

if (this.plugin.recentPlayers.size() > 0) {

sender.sendMessage(this.plugin.addColour("&8# &7Wszyscy podajrzani gracze:"));

for (final Map.Entry<String, Integer> e : this.plugin.recentPlayers.entrySet()) {

final int attacks = e.getValue();

String banned = "";

if (this.plugin.autoBanLimit > 0 && attacks >= this.plugin.autoBanLimit) {

banned = "&c[banned] ";

}

sender.sendMessage(this.plugin.addColour(String.valueOf(banned) + e.getKey() + " &7zaatakowal &e" + attacks + " boty/ow"));

}

return true;

}

sender.sendMessage(this.plugin.addColour("&8# &cBrak danych z ostatniego restartu."));

return true;

}

else if (cmd.startsWith("usun")) {

if (!sender.hasPermission("xaura.usun")) {

sender.sendMessage(this.plugin.addColour("&8# &7Brak uprawnien. &c(xaura.usun)"));

return true;

}

this.plugin.removeAllTestEntities();

sender.sendMessage(this.plugin.addColour("&8# &7Wszystkie boty zostaly usuniete."));

return true;

}

else if (cmd.startsWith("test")) {

if (!sender.hasPermission("xaura.testgraczy")) {

sender.sendMessage(this.plugin.addColour("&8# &7Brak uprawnien. &c(xaura.testgraczy)"));

return true;

}

if (args.length <= 1 || args[1] == null) {

sender.sendMessage(this.plugin.addColour("&cInvalid arguments, try &7/aj test <player>"));

invaildArg = true;

return true;

}

Player player = null;

player = Bukkit.getServer().getPlayerExact(args[1]);

if (player != null) {

player.setTicksLived(1);

this.plugin.resetTemp(player.getName());

this.plugin.spawnTestEntity(player);

sender.sendMessage(this.plugin.addColour("&8# &7Sprawdzanie gracza: &e" + player.getName() + "&7trwa..."));

return true;

}

sender.sendMessage(this.plugin.addColour("&8# &cNie znaleziono gracza o podanym nicku."));

return true;

}

else if (cmd.startsWith("spr")) {

if (!sender.hasPermission("xaura.spr")) {

sender.sendMessage(this.plugin.addColour("&8# &7Brak uprawnien. &c(xaura.spr)"));

return true;

}

if (args.length <= 2 || args[1] == null || args[2] == null) {

sender.sendMessage(this.plugin.addColour("&8# &7Poprawne uzwycie: &e/aura spr <gracz> <limit-ataku>"));

invaildArg = true;

return true;

}

final String pName = args[1];

final int tempLimit = Integer.parseInt(args[2]);

if (tempLimit > 0) {

if (this.plugin.tempRecent.containsKey(pName)) {

sender.sendMessage(this.plugin.addColour(this.plugin.alertMsg.replace("%p", pName).replace("%t", String.valueOf(this.plugin.attackTime)).replace("%a", String.valueOf(this.plugin.tempRecent.get(pName)))));

if (this.plugin.tempRecent.get(pName) >= tempLimit) {

Bukkit.dispatchCommand((CommandSender)Bukkit.getConsoleSender(), this.plugin.autoBanCMD.replace("%p", pName));

}

}

return true;

}

sender.sendMessage(this.plugin.addColour("&8# &7Poprawne uzwycie: &e/aura spr <gracz> <limit-ataku>"));

return true;

}

else if (!invaildArg) {

sender.sendMessage(this.plugin.addColour("&8# &7Lista komend: &e/aura help"));

}

}

else {

sender.sendMessage(this.plugin.addColour("&8# &7Aby uzyskac pomoc &e/aura help"));

}

return true;

}

return true;

}

}

 

 

 

 

xAntyAura - Ochron swoj serwer

784091427630431250239.png

Regulamin sygnatur

Zarchiwizowany

Ten temat przebywa obecnie w archiwum. Dodawanie nowych odpowiedzi zostało zablokowane.

×
×
  • Dodaj nową pozycję...