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

[Problem] Plugin Tools.


Rekomendowane odpowiedzi

Opublikowano

Witam, piszę aktualnie plugin, to znaczy uczę się ;D I mam błędy, wcześniej tych błędów nie było a nagle się zrobiły.

 

KOD BŁĘDU Z KOSOLII:

[10:21:29 INFO]: [G-Komendy] Enabling G-Komendy v1.0
[10:21:29 ERROR]: Error occurred while enabling G-Komendy v1.0 (Is it up to date?)
java.lang.NullPointerException
	at pl.gaben.komendy.PomocCommand.<init>(PomocCommand.java:19) ~[?:?]
	at pl.gaben.Main.onEnable(Main.java:144) ~[?:?]
	at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:316) ~[spigot-1.7.9-R0.3-SNAPSHOT.jar:git-Spigot-1543]
	at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:329) [spigot-1.7.9-R0.3-SNAPSHOT.jar:git-Spigot-1543]
	at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:405) [spigot-1.7.9-R0.3-SNAPSHOT.jar:git-Spigot-1543]
	at org.bukkit.craftbukkit.v1_7_R3.CraftServer.loadPlugin(CraftServer.java:476) [spigot-1.7.9-R0.3-SNAPSHOT.jar:git-Spigot-1543]
	at org.bukkit.craftbukkit.v1_7_R3.CraftServer.enablePlugins(CraftServer.java:394) [spigot-1.7.9-R0.3-SNAPSHOT.jar:git-Spigot-1543]
	at net.minecraft.server.v1_7_R3.MinecraftServer.n(MinecraftServer.java:360) [spigot-1.7.9-R0.3-SNAPSHOT.jar:git-Spigot-1543]
	at net.minecraft.server.v1_7_R3.MinecraftServer.g(MinecraftServer.java:334) [spigot-1.7.9-R0.3-SNAPSHOT.jar:git-Spigot-1543]
	at net.minecraft.server.v1_7_R3.MinecraftServer.a(MinecraftServer.java:290) [spigot-1.7.9-R0.3-SNAPSHOT.jar:git-Spigot-1543]
	at net.minecraft.server.v1_7_R3.DedicatedServer.init(DedicatedServer.java:194) [spigot-1.7.9-R0.3-SNAPSHOT.jar:git-Spigot-1543]
	at net.minecraft.server.v1_7_R3.MinecraftServer.run(MinecraftServer.java:458) [spigot-1.7.9-R0.3-SNAPSHOT.jar:git-Spigot-1543]
	at net.minecraft.server.v1_7_R3.ThreadServerApplication.run(SourceFile:628) [spigot-1.7.9-R0.3-SNAPSHOT.jar:git-Spigot-1543]

Mam też na moim 2 pluginie taki błąd.

Opublikowano

Zrobiłeś błąd w 19 linijce w klasie PomocCommand. Wróć do tej klasy i sprawdź to. Jak ci dalej nie będzie działać po twoim poprawieniu to daj kod tej klasy.

Opublikowano

Zrobiłeś błąd w 19 linijce w klasie PomocCommand. Wróć do tej klasy i sprawdź to. Jak ci dalej nie będzie działać po twoim poprawieniu to daj kod tej klasy.

    this.plugin.getCommand("pomoc").setExecutor(this);

 

Nie mam żadnych błędów...

 

 

REFRESH: Chodzi mi tylko o ten błąd:

Error occurred while enabling G-Komendy v1.0 (Is it up to date?)
Opublikowano

Ale jako Executor ty używasz klasy PomocCommand?

 

 

To zwraca ci że masz błąd:

 

 

REFRESH: Chodzi mi tylko o ten błąd:

Error occurred while enabling G-Komendy v1.0 (Is it up to date?)
Opublikowano

Ale jako Executor ty używasz klasy PomocCommand?

 

 

To zwraca ci że masz błąd:

Ale w każdej klasie mam Executor, powiesz mi jak to naprawić?

Opublikowano

._.

 

Podaj cały kod klasy głównej i klasy PomocCommand plz.

 

Bez tego gówno wiem, i gówno widzę.

 

ps: 

 

 

 this.plugin.getCommand("pomoc").setExecutor(this);

dajesz to w głównej klasie, a masz komendę w innej? 

W takim wypadku musisz dać

 

 

 this.plugin.getCommand("pomoc").setExecutor(new PomocCommand());

 

I czy dajesz napewno komendę do plugin.yml?

 

 

 

 

ps2: radzę używać własnych executorów, zrobię o tym kiedyś poradnik chyba...

Moja oficjalna strona! :)

http://socketbyte.pl/ 

Opublikowano

Jak to w każdej klasie? Tobie czasem nie chodzi o implementowanie CommandExecutor. No chyba że w każdej klasie masz: 

this.plugin.getCommand("Komenda").setExecutor(this); 

Jeżeli tak to zrobiłeś wielki błąd gdyż jako Executor ustawiasz swoją klasę główną w pluginie np. ja to robie tak w klasach:

 

public NazwaKlasy(Plugin plugin)

{

      plugin.getCommand("help").setExecutor(plugin);

}

 

wtedy w onEnable() robisz tak:

 

public void onEnable()

{

     new NazwaKlasy(this);

}

 

sorry jeżeli nie ładnie napisałem ale pisałem odręcznie bez środowiska.

Nie polecam robić w taki sposób, wygodniej jest po prostu używać getCommand().setExecutor(new Komenda()) :)

 

 

@antymarekpl1 :D

Tak jak pisałem, podaj cały kod, i sprawdź czy nie jest tak jak pisałem w ps

­

Moja oficjalna strona! :)

http://socketbyte.pl/ 

Opublikowano

Klasa Pomoc:

package pl.gaben.komendy;

import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender;
import org.bukkit.command.PluginCommand;
import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.entity.Player;
import pl.gaben.Main;

public class PomocCommand
  implements CommandExecutor
{
	Main plugin;
  
  public PomocCommand(Main plugin)
  {
    this.plugin = plugin;
    this.plugin.getCommand("pomoc").setExecutor(this);
  }
  
  public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args)
  {
    if ((sender instanceof Player))
    {
      Player player = (Player)sender;
      for (String s : this.plugin.getConfig().getStringList("config.messages.helpmessage"))
      {
        s = s.replace("&", "§");
        player.sendMessage(s);
      }
    }
    return false;
  }
}

Klasa Main:

package pl.gaben;

import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.Server;
import org.bukkit.World;
import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.configuration.file.YamlConfiguration;

import pl.gaben.listeners.ColorSignListener;

import org.bukkit.enchantments.Enchantment;
import org.bukkit.entity.Player;
import org.bukkit.event.player.PlayerTeleportEvent.TeleportCause;
import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.ShapedRecipe;
import org.bukkit.inventory.meta.ItemMeta;
import org.bukkit.plugin.Plugin;
import org.bukkit.plugin.java.JavaPlugin;
import org.bukkit.potion.PotionEffect;
import org.bukkit.potion.PotionEffectType;

import pl.gaben.listeners.BlockedPluginsListener;
import pl.gaben.listeners.InvinciblesListener;
import pl.gaben.listeners.InvinciblesManager;
import pl.gaben.listeners.PlayerDeathListener;
import pl.gaben.listeners.PlayerJoinListener;
import pl.gaben.listeners.PlayerLoginListener;
import pl.gaben.listeners.ServerListPingListener;
import pl.gaben.listeners.UnknownCommandListener;

import org.bukkit.scheduler.BukkitScheduler;
import org.bukkit.scheduler.BukkitTask;
import org.bukkit.Material;

import pl.gaben.listeners.ColorSignListener;
import pl.gaben.komendy.BroadcastCommand;
import pl.gaben.komendy.ClearInventoryCommand;
import pl.gaben.komendy.DayCommand;
import pl.gaben.komendy.DropCommand;
import pl.gaben.komendy.EnchantCommand;
import pl.gaben.komendy.EnderChestCommand;
import pl.gaben.komendy.FlyCommand;
import pl.gaben.komendy.GamemodeCommand;
import pl.gaben.komendy.HatCommand;
import pl.gaben.komendy.HealCommand;
import pl.gaben.komendy.HelpopCommand;
import pl.gaben.komendy.InvSeeCommand;
import pl.gaben.komendy.InvincibleCommand;
import pl.gaben.komendy.ItemCommand;
import pl.gaben.komendy.KickCommand;
import pl.gaben.komendy.KillCommand;
import pl.gaben.komendy.ListCommand;
import pl.gaben.komendy.LoreCommand;
import pl.gaben.komendy.NameCommand;
import pl.gaben.komendy.NightCommand;
import pl.gaben.komendy.PomocCommand;
import pl.gaben.komendy.ReloadCommand;
import pl.gaben.komendy.RepairCommand;
import pl.gaben.komendy.ReplyCommand;
import pl.gaben.komendy.SVipCommand;
import pl.gaben.komendy.SpeedCommand;
import pl.gaben.komendy.SunCommand;
import pl.gaben.komendy.TellCommand;
import pl.gaben.komendy.TpCommand;
import pl.gaben.komendy.TpallCommand;
import pl.gaben.komendy.TphereCommand;
import pl.gaben.komendy.VipCommand;
import pl.gaben.Config;
import pl.gaben.managers.Enchantments;
import pl.gaben.managers.HashMaps;
import pl.gaben.managers.Utils;

public class Main
  extends JavaPlugin
{
  BroadcastCommand broadcastCommand;
  TphereCommand tphereCommand;
  HelpopCommand helpopCommand;
  SpeedCommand speedCommand;
  HatCommand hatCommand;
  DayCommand dayCommand;
  NightCommand nightCommand;
  GamemodeCommand gamemodeCommand;
  InvSeeCommand invseeCommand;
  EnchantCommand enchantCommand;
  KillCommand killCommand;
  EnderChestCommand enderchestCommand;
  UnknownCommandListener unknowncommandlistener;
  HealCommand healCommand;
  NameCommand nameCommand;
  LoreCommand loreCommand;
  ItemCommand itemCommand;
  public InvinciblesManager invinciblesManager;
  InvincibleCommand invincibleCommand;
  InvinciblesListener invinciblesListener;
  KickCommand kickCommand;
  ListCommand listCommand;
  SunCommand sunCommand;
  RepairCommand repairCommand;
  FlyCommand flyCommand;
  ClearInventoryCommand clearinventoryCommand;
  TellCommand tellCommand;
  ReplyCommand replyCommand;
  TpCommand tpCommand;
  PomocCommand pomocCommand;
  VipCommand vipCommand;
  SVipCommand svipCommand;
  BlockedPluginsListener blockedpluginslistener;
  TpallCommand tpallCommand;
  public HashMap<Player, Player> lastMessageSender = new HashMap();
  ReloadCommand reloadCommand;
  public ColorSignListener colorSignListener;
  public Enchantments enchantments;
  private Enchantments enchants;
  public final DropCommand drop = new DropCommand(this);
  private Config cfg;
public Object configManager;
  
  public static Main getInstance()
  {
    return getInstance();
  }
  

  public void onEnable()
  {
    this.broadcastCommand = new BroadcastCommand(this);
    this.tphereCommand = new TphereCommand(this);
    this.helpopCommand = new HelpopCommand(this);
    this.speedCommand = new SpeedCommand(this);
    this.hatCommand = new HatCommand(this);
    this.healCommand = new HealCommand(this);
    this.pomocCommand = new PomocCommand(this);
    this.vipCommand = new VipCommand(this);
    this.svipCommand = new SVipCommand(this);
    this.killCommand = new KillCommand(this);
    this.tpCommand = new TpCommand(this);
    this.repairCommand = new RepairCommand(this);
    this.enderchestCommand = new EnderChestCommand(this);
    this.nameCommand = new NameCommand(this);
    this.loreCommand = new LoreCommand(this);
    this.itemCommand = new ItemCommand(this);
    this.sunCommand = new SunCommand(this);
    this.listCommand = new ListCommand(this);
    this.dayCommand = new DayCommand(this);
    this.nightCommand = new NightCommand(this);
    this.gamemodeCommand = new GamemodeCommand(this);
    this.unknowncommandlistener = new UnknownCommandListener(this);
    this.blockedpluginslistener = new BlockedPluginsListener(this);
    this.enchantments = new Enchantments(this);
    this.kickCommand = new KickCommand(this);
    this.flyCommand = new FlyCommand(this);
    this.clearinventoryCommand = new ClearInventoryCommand(this);
    this.tellCommand = new TellCommand(this);
    this.replyCommand = new ReplyCommand(this);
    this.colorSignListener = new ColorSignListener(this);
    this.reloadCommand = new ReloadCommand(this);
    this.invseeCommand = new InvSeeCommand(this);
    this.enchantCommand = new EnchantCommand(this);
    this.tpallCommand = new TpallCommand(this);
    this.invinciblesManager = new InvinciblesManager(this);
    this.invincibleCommand = new InvincibleCommand(this);
    this.invinciblesListener = new InvinciblesListener(this);
    saveDefaultConfig();
    this.cfg = new Config(this);
    getCommand("drop").setExecutor(new DropCommand(this));
    getServer().getPluginManager().registerEvents(new ColorSignListener(this), this);
    getServer().getPluginManager().registerEvents(new PlayerDeathListener(this), this);
    getServer().getPluginManager().registerEvents(new PlayerLoginListener(this), this);
    getServer().getPluginManager().registerEvents(new PlayerJoinListener(this), this);
    getServer().getPluginManager().registerEvents(new ServerListPingListener(this), this);
  }
  
  public void onDisable() {}

public String color(String string)
  {
    return string.replaceAll("&([0-9a-z])", "§$1");
  }
  
  public static boolean containsIgnoreCase(String[] board, String string)
  {
    for (String otherstring : board) {
      if (otherstring.equalsIgnoreCase(string)) {
        return true;
      }
    }
    return false;
  }
  
 
  
  public Config getCfg()
  {
    return this.cfg;
  }
  
  
  
  public static boolean containsIgnoreCase(List<String> board, String string)
  {
    for (String otherstring : board) {
      if (otherstring.equalsIgnoreCase(string)) {
        return true;
      }
    }
    return false;
  }
   
      public static Material getMaterial(String materialName)
      {
        Material returnMaterial = null;
        if (isInteger(materialName))
        {
          int id = Integer.parseInt(materialName);
          returnMaterial = Material.getMaterial(id);
        }
        else
        {
          returnMaterial = Material.matchMaterial(materialName);
        }
        return returnMaterial;
      }
      
      public static boolean isFloat(String string)
      {
        String decimalPattern = "([0-9]*)\\.([0-9]*)";
        boolean match = Pattern.matches(decimalPattern, string);
        return match;
      }
      
      public static boolean isDouble(String s)
      {
        try
        {
          Double.parseDouble(s);
        }
        catch (NumberFormatException nfe)
        {
          return false;
        }
        return true;
      }
      
      public static boolean isInteger(String string)
      {
        CharSequence sequence = string.subSequence(0, string.length());
        if (Pattern.matches("-?[0-9]+", sequence)) {
          return true;
        }
        return false;
      }
	}
Opublikowano

Nie polecam robić w taki sposób, wygodniej jest po prostu używać getCommand().setExecutor(new Komenda()) :)

 

 

@antymarekpl1 :D

Tak jak pisałem, podaj cały kod, i sprawdź czy nie jest tak jak pisałem w ps

­

Ja mu w ogóle źle to napisałem więc to usunąłem ty to dobrze napisałeś. Masz racje nie opłaca się robić w taki sposób. A ja chyba się zapomniałem i mu pod Listener zacząłem pisać więc jakby co to sorka za pomyłkę.

 

 

 

//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

 

 

 

 

Klasa Pomoc:

package pl.gaben.komendy;

import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender;
import org.bukkit.command.PluginCommand;
import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.entity.Player;
import pl.gaben.Main;

public class PomocCommand
  implements CommandExecutor
{
	Main plugin;
  
  public PomocCommand(Main plugin)
  {
    this.plugin = plugin;
    this.plugin.getCommand("pomoc").setExecutor(this);
  }
  
  public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args)
  {
    if ((sender instanceof Player))
    {
      Player player = (Player)sender;
      for (String s : this.plugin.getConfig().getStringList("config.messages.helpmessage"))
      {
        s = s.replace("&", "§");
        player.sendMessage(s);
      }
    }
    return false;
  }
}

Klasa Main:

package pl.gaben;

import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.Server;
import org.bukkit.World;
import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.configuration.file.YamlConfiguration;

import pl.gaben.listeners.ColorSignListener;

import org.bukkit.enchantments.Enchantment;
import org.bukkit.entity.Player;
import org.bukkit.event.player.PlayerTeleportEvent.TeleportCause;
import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.ShapedRecipe;
import org.bukkit.inventory.meta.ItemMeta;
import org.bukkit.plugin.Plugin;
import org.bukkit.plugin.java.JavaPlugin;
import org.bukkit.potion.PotionEffect;
import org.bukkit.potion.PotionEffectType;

import pl.gaben.listeners.BlockedPluginsListener;
import pl.gaben.listeners.InvinciblesListener;
import pl.gaben.listeners.InvinciblesManager;
import pl.gaben.listeners.PlayerDeathListener;
import pl.gaben.listeners.PlayerJoinListener;
import pl.gaben.listeners.PlayerLoginListener;
import pl.gaben.listeners.ServerListPingListener;
import pl.gaben.listeners.UnknownCommandListener;

import org.bukkit.scheduler.BukkitScheduler;
import org.bukkit.scheduler.BukkitTask;
import org.bukkit.Material;

import pl.gaben.listeners.ColorSignListener;
import pl.gaben.komendy.BroadcastCommand;
import pl.gaben.komendy.ClearInventoryCommand;
import pl.gaben.komendy.DayCommand;
import pl.gaben.komendy.DropCommand;
import pl.gaben.komendy.EnchantCommand;
import pl.gaben.komendy.EnderChestCommand;
import pl.gaben.komendy.FlyCommand;
import pl.gaben.komendy.GamemodeCommand;
import pl.gaben.komendy.HatCommand;
import pl.gaben.komendy.HealCommand;
import pl.gaben.komendy.HelpopCommand;
import pl.gaben.komendy.InvSeeCommand;
import pl.gaben.komendy.InvincibleCommand;
import pl.gaben.komendy.ItemCommand;
import pl.gaben.komendy.KickCommand;
import pl.gaben.komendy.KillCommand;
import pl.gaben.komendy.ListCommand;
import pl.gaben.komendy.LoreCommand;
import pl.gaben.komendy.NameCommand;
import pl.gaben.komendy.NightCommand;
import pl.gaben.komendy.PomocCommand;
import pl.gaben.komendy.ReloadCommand;
import pl.gaben.komendy.RepairCommand;
import pl.gaben.komendy.ReplyCommand;
import pl.gaben.komendy.SVipCommand;
import pl.gaben.komendy.SpeedCommand;
import pl.gaben.komendy.SunCommand;
import pl.gaben.komendy.TellCommand;
import pl.gaben.komendy.TpCommand;
import pl.gaben.komendy.TpallCommand;
import pl.gaben.komendy.TphereCommand;
import pl.gaben.komendy.VipCommand;
import pl.gaben.Config;
import pl.gaben.managers.Enchantments;
import pl.gaben.managers.HashMaps;
import pl.gaben.managers.Utils;

public class Main
  extends JavaPlugin
{
  BroadcastCommand broadcastCommand;
  TphereCommand tphereCommand;
  HelpopCommand helpopCommand;
  SpeedCommand speedCommand;
  HatCommand hatCommand;
  DayCommand dayCommand;
  NightCommand nightCommand;
  GamemodeCommand gamemodeCommand;
  InvSeeCommand invseeCommand;
  EnchantCommand enchantCommand;
  KillCommand killCommand;
  EnderChestCommand enderchestCommand;
  UnknownCommandListener unknowncommandlistener;
  HealCommand healCommand;
  NameCommand nameCommand;
  LoreCommand loreCommand;
  ItemCommand itemCommand;
  public InvinciblesManager invinciblesManager;
  InvincibleCommand invincibleCommand;
  InvinciblesListener invinciblesListener;
  KickCommand kickCommand;
  ListCommand listCommand;
  SunCommand sunCommand;
  RepairCommand repairCommand;
  FlyCommand flyCommand;
  ClearInventoryCommand clearinventoryCommand;
  TellCommand tellCommand;
  ReplyCommand replyCommand;
  TpCommand tpCommand;
  PomocCommand pomocCommand;
  VipCommand vipCommand;
  SVipCommand svipCommand;
  BlockedPluginsListener blockedpluginslistener;
  TpallCommand tpallCommand;
  public HashMap<Player, Player> lastMessageSender = new HashMap();
  ReloadCommand reloadCommand;
  public ColorSignListener colorSignListener;
  public Enchantments enchantments;
  private Enchantments enchants;
  public final DropCommand drop = new DropCommand(this);
  private Config cfg;
public Object configManager;
  

  public void onEnable()
  {
    this.broadcastCommand = new BroadcastCommand(this);
    this.tphereCommand = new TphereCommand(this);
    this.helpopCommand = new HelpopCommand(this);
    this.speedCommand = new SpeedCommand(this);
    this.hatCommand = new HatCommand(this);
    this.healCommand = new HealCommand(this);
    this.pomocCommand = new PomocCommand(this);
    this.vipCommand = new VipCommand(this);
    this.svipCommand = new SVipCommand(this);
    this.killCommand = new KillCommand(this);
    this.tpCommand = new TpCommand(this);
    this.repairCommand = new RepairCommand(this);
    this.enderchestCommand = new EnderChestCommand(this);
    this.nameCommand = new NameCommand(this);
    this.loreCommand = new LoreCommand(this);
    this.itemCommand = new ItemCommand(this);
    this.sunCommand = new SunCommand(this);
    this.listCommand = new ListCommand(this);
    this.dayCommand = new DayCommand(this);
    this.nightCommand = new NightCommand(this);
    this.gamemodeCommand = new GamemodeCommand(this);
    this.unknowncommandlistener = new UnknownCommandListener(this);
    this.blockedpluginslistener = new BlockedPluginsListener(this);
    this.enchantments = new Enchantments(this);
    this.kickCommand = new KickCommand(this);
    this.flyCommand = new FlyCommand(this);
    this.clearinventoryCommand = new ClearInventoryCommand(this);
    this.tellCommand = new TellCommand(this);
    this.replyCommand = new ReplyCommand(this);
    this.colorSignListener = new ColorSignListener(this);
    this.reloadCommand = new ReloadCommand(this);
    this.invseeCommand = new InvSeeCommand(this);
    this.enchantCommand = new EnchantCommand(this);
    this.tpallCommand = new TpallCommand(this);
    this.invinciblesManager = new InvinciblesManager(this);
    this.invincibleCommand = new InvincibleCommand(this);
    this.invinciblesListener = new InvinciblesListener(this);
    saveDefaultConfig();
    this.cfg = new Config(this);
    getCommand("drop").setExecutor(new DropCommand(this));
    getServer().getPluginManager().registerEvents(new ColorSignListener(this), this);
    getServer().getPluginManager().registerEvents(new PlayerDeathListener(this), this);
    getServer().getPluginManager().registerEvents(new PlayerLoginListener(this), this);
    getServer().getPluginManager().registerEvents(new PlayerJoinListener(this), this);
    getServer().getPluginManager().registerEvents(new ServerListPingListener(this), this);
  }

Zmień ten kod nie rejestruj tak komend tylko zrób to co napisał ci Adam.

Bo narazie tylko komenda drop jest właściwie zarejestrowana

Opublikowano

Ja mu w ogóle źle to napisałem więc to usunąłem ty to dobrze napisałeś. Masz racje nie opłaca się robić w taki sposób. A ja chyba się zapomniałem i mu pod Listener zacząłem pisać więc jakby co to sorka za pomyłkę.

 

 

 

//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

 

 

 

Zmień ten kod nie rejestruj tak komend tylko zrób to co napisał ci Adam.

Bo narazie tylko komenda drop jest właściwie zarejestrowana

Tyle że wcześniej wszystko 100% działało, a teraz nic ;(

 

PS: Ta komenda drop też nie działa -.- A wcześniej działała.

Opublikowano

Tyle że wcześniej wszystko 100% działało, a teraz nic ;(

 

PS: Ta komenda drop też nie działa -.- A wcześniej działała.

Dobra już prawie wszystko wiem lecz nadal nie umiem tego rozwiązać, usunąłem Klase Pomoc i wszystkie komendy zaczęły nagle działać, jest tylko problem w tym czemu ta klasa akurat nie działa? Ponieważ klasa VipCommand i SVIp Command jest taka sama tylko inne nazwy itp...

 

REFRESH:

 TEMAT DO ZAMKNIĘCIA :) SAM SOBIE PORADZIŁEM :D

Zarchiwizowany

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

×
×
  • Dodaj nową pozycję...