Solved Is it up to date? onEnable problem

Discussion in 'Plugin Development' started by EDSEL, Aug 7, 2019.

  1. Offline

    EDSEL

    cmd:
    22:41:44 ERROR]: Error occurred while enabling TUTO v1.0 (Is it up to date?)
    java.lang.NullPointerException
    at FR.MITHASKYLAND.TUTO.mainn.onEnable(mainn.java:32) ~[?:?]
    at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:321) ~[1.8.8.jar:git-Bukkit-18fbb24]
    at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:332) [1.8.8.jar:git-Bukkit-18fbb24]
    at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:404) [1.8.8.jar:git-Bukkit-18fbb24]
    at org.bukkit.craftbukkit.v1_8_R3.CraftServer.loadPlugin(CraftServer.java:342) [1.8.8.jar:git-Bukkit-18fbb24]
    at org.bukkit.craftbukkit.v1_8_R3.CraftServer.enablePlugins(CraftServer.java:314) [1.8.8.jar:git-Bukkit-18fbb24]
    at net.minecraft.server.v1_8_R3.MinecraftServer.s(MinecraftServer.java:406) [1.8.8.jar:git-Bukkit-18fbb24]
    at net.minecraft.server.v1_8_R3.MinecraftServer.k(MinecraftServer.java:370) [1.8.8.jar:git-Bukkit-18fbb24]
    at net.minecraft.server.v1_8_R3.MinecraftServer.a(MinecraftServer.java:325) [1.8.8.jar:git-Bukkit-18fbb24]
    at net.minecraft.server.v1_8_R3.DedicatedServer.init(DedicatedServer.java:235) [1.8.8.jar:git-Bukkit-18fbb24]
    at net.minecraft.server.v1_8_R3.MinecraftServer.run(MinecraftServer.java:504) [1.8.8.jar:git-Bukkit-18fbb24]
    at java.lang.Thread.run(Unknown Source) [?:1.8.0_212]



    code:
    public class mainn extends JavaPlugin{


    List<Player> connect = new ArrayList<>();


    @Override
    public void onDisable() {

    super.onDisable();
    }


    @Override
    public void onEnable() {
    ConsoleCommandSender con = Bukkit.getConsoleSender();
    con.sendMessage("Teraz da rade jak cos");




    getCommand("register").setExecutor(new commands(this));
    getCommand("login").setExecutor(new commands(this));
    getServer().getPluginManager().registerEvents(new EventsListener(this), this);

    saveDefaultConfig();


    super.onEnable();
    }
     
  2. Offline

    KarimAKL

    EDSEL likes this.
  3. Offline

    EDSEL

    @KarimAKL
    This is my plugin.yml:
    name: TUTO
    version: 1.0
    author: EDSEL
    main: FR.MITHASKYLAND.TUTO.Main
    commends:
    register:
    description: asdsadsad
    login:
    description: dsadsadsad

    @KarimAKL
    This is my plugin.yml:



    Code:
    name: TUTO
    version: 1.0
    author: EDSEL
    main: FR.MITHASKYLAND.TUTO.Main
    commends:
      register:
        description: asdsadsad
      login:
        description: dsadsadsad
    no thx

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Aug 7, 2019
  4. Offline

    KarimAKL

    @EDSEL You have 'commends' instead of 'commands'.
     

Share This Page