Prefix Plugin adding Points Int!?

Discussion in 'Plugin Development' started by envic, Jun 28, 2016.

Thread Status:
Not open for further replies.
  1. Offline

    envic

    Hi guys,
    I just want to create simple prefix plugin for minecraft server,which is shows each player points in chatbox. The API i used = PlayerPoints & Spigot 1.9.4 shaded. About PlayerPoints API : Click here

    As console Show problem is here on PlayerListener.java:

    Code:
    package points.prefix;
    import org.bukkit.ChatColor;
    import org.bukkit.entity.Player;
    import org.bukkit.event.EventHandler;
    import org.bukkit.event.Listener;
    import org.bukkit.event.player.PlayerJoinEvent;
    import org.black_ixx.playerpoints.PlayerPoints;
    
    
    public class PlayerListener implements Listener {
    
    Main plugin;
    public PlayerListener(Main instance){
         this.plugin = instance;
    } 
    
    public PlayerPoints getPlayerPoints() {
        return getPlayerPoints();
    }
    
    //OnPlayer Join
    @EventHandler
    public void playerjoin(PlayerJoinEvent e){
        Player p = e.getPlayer();
        String pname = p.getName();
        int points = getPlayerPoints().getAPI().look("Player");
    
        //Begin
        if (p.hasPermission("prefix.point")){
            String member = "" + ChatColor.WHITE + "[" + ChatColor.GREEN + points + ChatColor.WHITE + "]" + ChatColor.RESET + ChatColor.WHITE + pname + ChatColor.RESET + "";
            p.setDisplayName(member);
        }
    } }
    error log from spigot console:
    Code:
    points.prefix.PlayerListener.getPlayerPoints(PlayerListener.java:19) ~[?:?]
    [20:57:40] 
    error log from eclipse:
    Code:
    The method look(String) from the type PlayerPointsAPI is deprecated
    Here an other note: In PlayerpointsAPI page mentioned to use:
    Code:
    int balance = playerPoints.getAPI().look("Player");
    or showing balance! but it is not working!

    Any one know what's wrong?

    Thank U.
     
  2. Offline

    timtower Administrator Administrator Moderator

    @envic Please post the full error, that single line doesn't tell a lot.
    And playerpoints probably uses uuids and not strings anymore.
    And you have "player" hardcoded, I assume that that needs to change into the name or uuid of the player.
    And you are setting the displayname to just the points, no regular name left.
     
  3. Offline

    envic

    Here is complete source code: DropBox
    Here is complete spigot error log: PasteBin

    Happy to fix it :D
     
    Last edited: Jun 28, 2016
  4. Offline

    timtower Administrator Administrator Moderator

    @envic You have a method calling itself.
    Code:
    public PlayerPoints getPlayerPoints() {
        return getPlayerPoints();
    }
    There is your error.
     
  5. Offline

    envic

    could u fix the code (playerListener) and send it to me!?
     
  6. Offline

    timtower Administrator Administrator Moderator

    @envic No, I won't spoonfeed.
    The getPlayerPoints method should make a call to the playerpoints plugin and get an instance.
     
    bwfcwalshy likes this.
  7. Offline

    envic

    Okay *_*.
    Let me test. . ..
    But i'm webdeveloper not a Java Programmer! it's afew strange for me!
     
    Last edited: Jun 28, 2016
  8. @envic The only really tip for Bukkit and I fact any single API on the face of this earth. Always learn the language it's created in before using an API. In this case, learn Java before messing with Bukkit.
     
    timtower likes this.
  9. Offline

    envic

    i know what u mean,but i didn't use to be a java programmer! u know! it was a feature i wanted to have in my server, but no plugin exist for that. i though 50% i could do it by myself! it couldn't be so hard!
    but i have a question:
    why when other programmer can fix it less that 5 min, they ignore it!???
     
  10. Offline

    timtower Administrator Administrator Moderator

    @envic Because this isn't a plugin request.
    This is somebody new to java trying to learn the language.
    Giving him the code straight away is bad because he won't know what is going on in the code.
     
    Zombie_Striker and bwfcwalshy like this.
  11. Offline

    envic

    aaaam,I listened your advice & I'm back to work!
    i guess i solved calling method problem in this way:
    Code:
    public void playerjoin(PlayerJoinEvent e){
    Player p = e.getPlayer();
    String pname = p.getName();
    PlayerPoints pp = new PlayerPoints();
    pp.getAPI().look(p.getUniqueId());
    But unfortunately still i have a error log on spigot console:
    Code:
    [23:01:26] [Server thread/INFO]: Starting minecraft server version 1.9
    [23:01:26] [Server thread/INFO]: Loading properties
    [23:01:26] [Server thread/INFO]: Default game type: SURVIVAL
    [23:01:27] [Server thread/INFO]: This server is running CraftBukkit version git-Spigot-7d15d07-c194444 (MC: 1.9) (Implementing API version 1.9-SNAPSHOT)
    [23:01:27] [Server thread/INFO]: Debug logging is disabled
    [23:01:27] [Server thread/INFO]: Using 4 threads for Netty based IO
    [23:01:27] [Server thread/INFO]: Server Ping Player Sample Count: 12
    [23:01:28] [Server thread/INFO]: Generating keypair
    [23:01:28] [Server thread/INFO]: Starting Minecraft server on *:25565
    [23:01:28] [Server thread/INFO]: Using default channel type
    [23:01:31] [Server thread/INFO]: Set PluginClassLoader as parallel capable
    [23:01:31] [Server thread/INFO]: [ProtocolLib] Loading ProtocolLib v4.0.1
    [23:01:32] [Server thread/INFO]: [PermissionsEx] Loading PermissionsEx v1.23.4
    [23:01:32] [Server thread/WARN]: [PermissionsEx] This server is in offline mode. Unless this server is configured to integrate with a supported proxy (see http://dft.ba/-8ous), UUIDs *may not be stable*!
    [23:01:32] [Server thread/INFO]: [Votifier] Loading Votifier v1.9
    [23:01:32] [Server thread/INFO]: [PlayerPoints] Loading PlayerPoints v2.1.4
    [23:01:32] [Server thread/INFO]: [pointsprefix] Loading pointsprefix v0.5
    [23:01:32] [Server thread/INFO]: [ProtocolLib] Enabling ProtocolLib v4.0.1
    [23:01:32] [Server thread/INFO]: [ProtocolLib] Started structure compiler thread.
    [23:01:32] [Server thread/WARN]: **** SERVER IS RUNNING IN OFFLINE/INSECURE MODE!
    [23:01:32] [Server thread/WARN]: The server will make no attempt to authenticate usernames. Beware.
    [23:01:32] [Server thread/WARN]: While this makes the game possible to play without internet access, it also opens up the ability for hackers to connect with any username they choose.
    [23:01:32] [Server thread/WARN]: To change this, set "online-mode" to "true" in the server.properties file.
    [23:01:32] [Server thread/INFO]: **** Beginning UUID conversion, this may take A LONG time ****
    [23:01:32] [Server thread/INFO]: Preparing level "Zamin"
    [23:01:32] [Server thread/INFO]: -------- World Settings For [Zamin] --------
    [23:01:32] [Server thread/INFO]: Item Despawn Rate: 6000
    [23:01:32] [Server thread/INFO]: Arrow Despawn Rate: 1200
    [23:01:32] [Server thread/INFO]: Item Merge Radius: 2.5
    [23:01:32] [Server thread/INFO]: Allow Zombie Pigmen to spawn from portal blocks: true
    [23:01:32] [Server thread/INFO]: View Distance: 10
    [23:01:32] [Server thread/INFO]: Zombie Aggressive Towards Villager: true
    [23:01:32] [Server thread/INFO]: Experience Merge Radius: 3.0
    [23:01:32] [Server thread/INFO]: Hopper Transfer: 8 Hopper Check: 8 Hopper Amount: 1
    [23:01:32] [Server thread/INFO]: Random Lighting Updates: false
    [23:01:32] [Server thread/INFO]: Tile Max Tick Time: 50ms Entity max Tick Time: 50ms
    [23:01:32] [Server thread/INFO]: Mob Spawn Range: 4
    [23:01:32] [Server thread/INFO]: Max Entity Collisions: 8
    [23:01:32] [Server thread/INFO]: Custom Map Seeds:  Village: 10387312 Feature: 14357617
    [23:01:32] [Server thread/INFO]: Entity Activation Range: An 32 / Mo 32 / Mi 16
    [23:01:32] [Server thread/INFO]: Entity Tracking Range: Pl 48 / An 48 / Mo 48 / Mi 32 / Other 64
    [23:01:32] [Server thread/INFO]: Max TNT Explosions: 100
    [23:01:32] [Server thread/INFO]: Cactus Growth Modifier: 100%
    [23:01:32] [Server thread/INFO]: Cane Growth Modifier: 100%
    [23:01:32] [Server thread/INFO]: Melon Growth Modifier: 100%
    [23:01:32] [Server thread/INFO]: Mushroom Growth Modifier: 100%
    [23:01:32] [Server thread/INFO]: Pumpkin Growth Modifier: 100%
    [23:01:32] [Server thread/INFO]: Sapling Growth Modifier: 100%
    [23:01:32] [Server thread/INFO]: Wheat Growth Modifier: 100%
    [23:01:32] [Server thread/INFO]: NetherWart Growth Modifier: 100%
    [23:01:32] [Server thread/INFO]: Structure Info Saving: true
    [23:01:32] [Server thread/INFO]: Nerfing mobs spawned from spawners: false
    [23:01:33] [Server thread/INFO]: -------- World Settings For [Zamin_nether] --------
    [23:01:33] [Server thread/INFO]: Item Despawn Rate: 6000
    [23:01:33] [Server thread/INFO]: Arrow Despawn Rate: 1200
    [23:01:33] [Server thread/INFO]: Item Merge Radius: 2.5
    [23:01:33] [Server thread/INFO]: Allow Zombie Pigmen to spawn from portal blocks: true
    [23:01:33] [Server thread/INFO]: View Distance: 10
    [23:01:33] [Server thread/INFO]: Zombie Aggressive Towards Villager: true
    [23:01:33] [Server thread/INFO]: Experience Merge Radius: 3.0
    [23:01:33] [Server thread/INFO]: Hopper Transfer: 8 Hopper Check: 8 Hopper Amount: 1
    [23:01:33] [Server thread/INFO]: Random Lighting Updates: false
    [23:01:33] [Server thread/INFO]: Tile Max Tick Time: 50ms Entity max Tick Time: 50ms
    [23:01:33] [Server thread/INFO]: Mob Spawn Range: 4
    [23:01:33] [Server thread/INFO]: Max Entity Collisions: 8
    [23:01:33] [Server thread/INFO]: Custom Map Seeds:  Village: 10387312 Feature: 14357617
    [23:01:33] [Server thread/INFO]: Entity Activation Range: An 32 / Mo 32 / Mi 16
    [23:01:33] [Server thread/INFO]: Entity Tracking Range: Pl 48 / An 48 / Mo 48 / Mi 32 / Other 64
    [23:01:33] [Server thread/INFO]: Max TNT Explosions: 100
    [23:01:33] [Server thread/INFO]: Cactus Growth Modifier: 100%
    [23:01:33] [Server thread/INFO]: Cane Growth Modifier: 100%
    [23:01:33] [Server thread/INFO]: Melon Growth Modifier: 100%
    [23:01:33] [Server thread/INFO]: Mushroom Growth Modifier: 100%
    [23:01:33] [Server thread/INFO]: Pumpkin Growth Modifier: 100%
    [23:01:33] [Server thread/INFO]: Sapling Growth Modifier: 100%
    [23:01:33] [Server thread/INFO]: Wheat Growth Modifier: 100%
    [23:01:33] [Server thread/INFO]: NetherWart Growth Modifier: 100%
    [23:01:33] [Server thread/INFO]: Structure Info Saving: true
    [23:01:33] [Server thread/INFO]: Nerfing mobs spawned from spawners: false
    [23:01:33] [Server thread/INFO]: -------- World Settings For [Zamin_the_end] --------
    [23:01:33] [Server thread/INFO]: Item Despawn Rate: 6000
    [23:01:33] [Server thread/INFO]: Arrow Despawn Rate: 1200
    [23:01:33] [Server thread/INFO]: Item Merge Radius: 2.5
    [23:01:33] [Server thread/INFO]: Allow Zombie Pigmen to spawn from portal blocks: true
    [23:01:33] [Server thread/INFO]: View Distance: 10
    [23:01:33] [Server thread/INFO]: Zombie Aggressive Towards Villager: true
    [23:01:33] [Server thread/INFO]: Experience Merge Radius: 3.0
    [23:01:33] [Server thread/INFO]: Hopper Transfer: 8 Hopper Check: 8 Hopper Amount: 1
    [23:01:33] [Server thread/INFO]: Random Lighting Updates: false
    [23:01:33] [Server thread/INFO]: Tile Max Tick Time: 50ms Entity max Tick Time: 50ms
    [23:01:33] [Server thread/INFO]: Mob Spawn Range: 4
    [23:01:33] [Server thread/INFO]: Max Entity Collisions: 8
    [23:01:33] [Server thread/INFO]: Custom Map Seeds:  Village: 10387312 Feature: 14357617
    [23:01:33] [Server thread/INFO]: Entity Activation Range: An 32 / Mo 32 / Mi 16
    [23:01:33] [Server thread/INFO]: Entity Tracking Range: Pl 48 / An 48 / Mo 48 / Mi 32 / Other 64
    [23:01:33] [Server thread/INFO]: Max TNT Explosions: 100
    [23:01:33] [Server thread/INFO]: Cactus Growth Modifier: 100%
    [23:01:33] [Server thread/INFO]: Cane Growth Modifier: 100%
    [23:01:33] [Server thread/INFO]: Melon Growth Modifier: 100%
    [23:01:33] [Server thread/INFO]: Mushroom Growth Modifier: 100%
    [23:01:33] [Server thread/INFO]: Pumpkin Growth Modifier: 100%
    [23:01:33] [Server thread/INFO]: Sapling Growth Modifier: 100%
    [23:01:33] [Server thread/INFO]: Wheat Growth Modifier: 100%
    [23:01:33] [Server thread/INFO]: NetherWart Growth Modifier: 100%
    [23:01:33] [Server thread/INFO]: Structure Info Saving: true
    [23:01:33] [Server thread/INFO]: Nerfing mobs spawned from spawners: false
    [23:01:33] [Server thread/INFO]: Preparing start region for level 0 (Seed: -5817586507250097432)
    [23:01:35] [Server thread/INFO]: Preparing spawn area: 0%
    [23:01:36] [Server thread/INFO]: Preparing spawn area: 12%
    [23:01:37] [Server thread/INFO]: Preparing spawn area: 29%
    [23:01:38] [Server thread/INFO]: Preparing spawn area: 41%
    [23:01:39] [Server thread/INFO]: Preparing spawn area: 56%
    [23:01:40] [Server thread/INFO]: Preparing spawn area: 75%
    [23:01:41] [Server thread/INFO]: Preparing start region for level 1 (Seed: -5817586507250097432)
    [23:01:42] [Server thread/INFO]: Preparing spawn area: 19%
    [23:01:43] [Server thread/INFO]: Preparing spawn area: 36%
    [23:01:44] [Server thread/INFO]: Preparing spawn area: 57%
    [23:01:45] [Server thread/INFO]: Preparing spawn area: 81%
    [23:01:45] [Server thread/INFO]: Preparing start region for level 2 (Seed: -5817586507250097432)
    [23:01:46] [Server thread/INFO]: [PermissionsEx] Enabling PermissionsEx v1.23.4
    [23:01:46] [Server thread/INFO]: [PermissionsEx] Initializing file backend
    [23:01:46] [Server thread/INFO]: [PermissionsEx] Permissions file successfully reloaded
    [23:01:46] [Server thread/INFO]: [Votifier] Enabling Votifier v1.9
    [23:01:47] [Server thread/INFO]: [Votifier] Votifier enabled.
    [23:01:47] [Server thread/INFO]: [PlayerPoints] Enabling PlayerPoints v2.1.4
    [23:01:47] [Server thread/INFO]: [pointsprefix] Enabling pointsprefix v0.5
    [23:01:47] [Server thread/INFO]: [pointsprefix] Ba Movafaghiat fa'al shod.
    [23:01:47] [Server thread/INFO]: Server permissions file permissions.yml is empty, ignoring it
    [23:01:47] [Server thread/INFO]: Done (14.549s)! For help, type "help" or "?"
    [23:01:51] [User Authenticator #1/INFO]: UUID of player sunilla is 1a1a4a2a-9f29-339d-a0f3-049ebedf7e7d
    [23:01:52] [Server thread/ERROR]: Could not pass event PlayerJoinEvent to pointsprefix v0.5
    org.bukkit.event.EventException
        at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:310) ~[spigot-1.9.jar:git-Spigot-7d15d07-c194444]
        at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62) ~[spigot-1.9.jar:git-Spigot-7d15d07-c194444]
        at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:502) [spigot-1.9.jar:git-Spigot-7d15d07-c194444]
        at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:487) [spigot-1.9.jar:git-Spigot-7d15d07-c194444]
        at net.minecraft.server.v1_9_R1.PlayerList.onPlayerJoin(PlayerList.java:332) [spigot-1.9.jar:git-Spigot-7d15d07-c194444]
        at net.minecraft.server.v1_9_R1.PlayerList.a(PlayerList.java:158) [spigot-1.9.jar:git-Spigot-7d15d07-c194444]
        at net.minecraft.server.v1_9_R1.LoginListener.b(LoginListener.java:144) [spigot-1.9.jar:git-Spigot-7d15d07-c194444]
        at net.minecraft.server.v1_9_R1.LoginListener.c(LoginListener.java:54) [spigot-1.9.jar:git-Spigot-7d15d07-c194444]
        at net.minecraft.server.v1_9_R1.NetworkManager.a(NetworkManager.java:232) [spigot-1.9.jar:git-Spigot-7d15d07-c194444]
        at net.minecraft.server.v1_9_R1.ServerConnection.c(ServerConnection.java:141) [spigot-1.9.jar:git-Spigot-7d15d07-c194444]
        at net.minecraft.server.v1_9_R1.MinecraftServer.D(MinecraftServer.java:815) [spigot-1.9.jar:git-Spigot-7d15d07-c194444]
        at net.minecraft.server.v1_9_R1.DedicatedServer.D(DedicatedServer.java:400) [spigot-1.9.jar:git-Spigot-7d15d07-c194444]
        at net.minecraft.server.v1_9_R1.MinecraftServer.C(MinecraftServer.java:655) [spigot-1.9.jar:git-Spigot-7d15d07-c194444]
        at net.minecraft.server.v1_9_R1.MinecraftServer.run(MinecraftServer.java:554) [spigot-1.9.jar:git-Spigot-7d15d07-c194444]
        at java.lang.Thread.run(Unknown Source) [?:1.7.0_25]
    Caused by: java.lang.IllegalArgumentException: Plugin already initialized!
        at org.bukkit.plugin.java.PluginClassLoader.initialize(PluginClassLoader.java:122) ~[spigot-1.9.jar:git-Spigot-7d15d07-c194444]
        at org.bukkit.plugin.java.JavaPlugin.<init>(JavaPlugin.java:66) ~[spigot-1.9.jar:git-Spigot-7d15d07-c194444]
        at org.black_ixx.playerpoints.PlayerPoints.<init>(PlayerPoints.java:33) ~[?:?]
        at points.prefix.PlayerListener.playerjoin(PlayerListener.java:26) ~[?:?]
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.7.0_25]
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_25]
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_25]
        at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.7.0_25]
        at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:306) ~[spigot-1.9.jar:git-Spigot-7d15d07-c194444]
        ... 14 more
    Caused by: java.lang.IllegalStateException: Initial initialization
        at org.bukkit.plugin.java.PluginClassLoader.initialize(PluginClassLoader.java:125) ~[spigot-1.9.jar:git-Spigot-7d15d07-c194444]
        at org.bukkit.plugin.java.JavaPlugin.<init>(JavaPlugin.java:66) ~[spigot-1.9.jar:git-Spigot-7d15d07-c194444]
        at org.black_ixx.playerpoints.PlayerPoints.<init>(PlayerPoints.java:33) ~[?:?]
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:1.7.0_25]
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) ~[?:1.7.0_25]
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) ~[?:1.7.0_25]
        at java.lang.reflect.Constructor.newInstance(Unknown Source) ~[?:1.7.0_25]
        at java.lang.Class.newInstance(Unknown Source) ~[?:1.7.0_25]
        at org.bukkit.plugin.java.PluginClassLoader.<init>(PluginClassLoader.java:76) ~[spigot-1.9.jar:git-Spigot-7d15d07-c194444]
        at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:131) ~[spigot-1.9.jar:git-Spigot-7d15d07-c194444]
        at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:329) ~[spigot-1.9.jar:git-Spigot-7d15d07-c194444]
        at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:251) ~[spigot-1.9.jar:git-Spigot-7d15d07-c194444]
        at org.bukkit.craftbukkit.v1_9_R1.CraftServer.loadPlugins(CraftServer.java:296) ~[spigot-1.9.jar:git-Spigot-7d15d07-c194444]
        at net.minecraft.server.v1_9_R1.DedicatedServer.init(DedicatedServer.java:201) ~[spigot-1.9.jar:git-Spigot-7d15d07-c194444]
        at net.minecraft.server.v1_9_R1.MinecraftServer.run(MinecraftServer.java:522) ~[spigot-1.9.jar:git-Spigot-7d15d07-c194444]
        ... 1 more
    [23:01:54] [Server thread/INFO]: sunilla[/127.0.0.1:62324] logged in with entity id 104 at ([Zamin]-258.44497780763504, 70.0, 168.57201483496465)
    [23:03:04] [Async Chat Thread - #0/INFO]: <sunilla> :|ah[m
    [23:03:10] [Async Chat Thread - #0/INFO]: <sunilla> Still not working[m
    [23:03:26] [Server thread/INFO]: sunilla lost connection: Disconnected
    [23:03:26] [Server thread/INFO]: sunilla left the game.
    [23:03:30] [User Authenticator #2/INFO]: UUID of player sunilla is 1a1a4a2a-9f29-339d-a0f3-049ebedf7e7d
    [23:03:30] [Server thread/ERROR]: Could not pass event PlayerJoinEvent to pointsprefix v0.5
    org.bukkit.event.EventException
        at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:310) ~[spigot-1.9.jar:git-Spigot-7d15d07-c194444]
        at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62) ~[spigot-1.9.jar:git-Spigot-7d15d07-c194444]
        at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:502) [spigot-1.9.jar:git-Spigot-7d15d07-c194444]
        at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:487) [spigot-1.9.jar:git-Spigot-7d15d07-c194444]
        at net.minecraft.server.v1_9_R1.PlayerList.onPlayerJoin(PlayerList.java:332) [spigot-1.9.jar:git-Spigot-7d15d07-c194444]
        at net.minecraft.server.v1_9_R1.PlayerList.a(PlayerList.java:158) [spigot-1.9.jar:git-Spigot-7d15d07-c194444]
        at net.minecraft.server.v1_9_R1.LoginListener.b(LoginListener.java:144) [spigot-1.9.jar:git-Spigot-7d15d07-c194444]
        at net.minecraft.server.v1_9_R1.LoginListener.c(LoginListener.java:54) [spigot-1.9.jar:git-Spigot-7d15d07-c194444]
        at net.minecraft.server.v1_9_R1.NetworkManager.a(NetworkManager.java:232) [spigot-1.9.jar:git-Spigot-7d15d07-c194444]
        at net.minecraft.server.v1_9_R1.ServerConnection.c(ServerConnection.java:141) [spigot-1.9.jar:git-Spigot-7d15d07-c194444]
        at net.minecraft.server.v1_9_R1.MinecraftServer.D(MinecraftServer.java:815) [spigot-1.9.jar:git-Spigot-7d15d07-c194444]
        at net.minecraft.server.v1_9_R1.DedicatedServer.D(DedicatedServer.java:400) [spigot-1.9.jar:git-Spigot-7d15d07-c194444]
        at net.minecraft.server.v1_9_R1.MinecraftServer.C(MinecraftServer.java:655) [spigot-1.9.jar:git-Spigot-7d15d07-c194444]
        at net.minecraft.server.v1_9_R1.MinecraftServer.run(MinecraftServer.java:554) [spigot-1.9.jar:git-Spigot-7d15d07-c194444]
        at java.lang.Thread.run(Unknown Source) [?:1.7.0_25]
    Caused by: java.lang.IllegalArgumentException: Plugin already initialized!
        at org.bukkit.plugin.java.PluginClassLoader.initialize(PluginClassLoader.java:122) ~[spigot-1.9.jar:git-Spigot-7d15d07-c194444]
        at org.bukkit.plugin.java.JavaPlugin.<init>(JavaPlugin.java:66) ~[spigot-1.9.jar:git-Spigot-7d15d07-c194444]
        at org.black_ixx.playerpoints.PlayerPoints.<init>(PlayerPoints.java:33) ~[?:?]
        at points.prefix.PlayerListener.playerjoin(PlayerListener.java:26) ~[?:?]
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.7.0_25]
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_25]
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_25]
        at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.7.0_25]
        at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:306) ~[spigot-1.9.jar:git-Spigot-7d15d07-c194444]
        ... 14 more
    Caused by: java.lang.IllegalStateException: Initial initialization
        at org.bukkit.plugin.java.PluginClassLoader.initialize(PluginClassLoader.java:125) ~[spigot-1.9.jar:git-Spigot-7d15d07-c194444]
        at org.bukkit.plugin.java.JavaPlugin.<init>(JavaPlugin.java:66) ~[spigot-1.9.jar:git-Spigot-7d15d07-c194444]
        at org.black_ixx.playerpoints.PlayerPoints.<init>(PlayerPoints.java:33) ~[?:?]
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:1.7.0_25]
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) ~[?:1.7.0_25]
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) ~[?:1.7.0_25]
        at java.lang.reflect.Constructor.newInstance(Unknown Source) ~[?:1.7.0_25]
        at java.lang.Class.newInstance(Unknown Source) ~[?:1.7.0_25]
        at org.bukkit.plugin.java.PluginClassLoader.<init>(PluginClassLoader.java:76) ~[spigot-1.9.jar:git-Spigot-7d15d07-c194444]
        at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:131) ~[spigot-1.9.jar:git-Spigot-7d15d07-c194444]
        at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:329) ~[spigot-1.9.jar:git-Spigot-7d15d07-c194444]
        at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:251) ~[spigot-1.9.jar:git-Spigot-7d15d07-c194444]
        at org.bukkit.craftbukkit.v1_9_R1.CraftServer.loadPlugins(CraftServer.java:296) ~[spigot-1.9.jar:git-Spigot-7d15d07-c194444]
        at net.minecraft.server.v1_9_R1.DedicatedServer.init(DedicatedServer.java:201) ~[spigot-1.9.jar:git-Spigot-7d15d07-c194444]
        at net.minecraft.server.v1_9_R1.MinecraftServer.run(MinecraftServer.java:522) ~[spigot-1.9.jar:git-Spigot-7d15d07-c194444]
        ... 1 more
    [23:03:30] [Server thread/INFO]: sunilla[/127.0.0.1:62331] logged in with entity id 369 at ([Zamin]-262.5508083259889, 71.0, 156.30925343339035)
    [23:03:39] [Async Chat Thread - #0/INFO]: <sunilla> whhhhhhhhhhhhhy?[m
    [23:03:45] [Async Chat Thread - #0/INFO]: <sunilla> WHY NOT Wroking ! :|[m
    [23:03:49] [Async Chat Thread - #0/INFO]: <sunilla> :\[m
    [23:04:07] [Async Chat Thread - #0/INFO]: <sunilla> T_T WHY?[m
    [23:04:20] [Server thread/INFO]: sunilla lost connection: Disconnected
    [23:04:20] [Server thread/INFO]: sunilla left the game.
    [23:04:47] [Server thread/INFO]: Stopping the server
    [23:04:47] [Server thread/INFO]: Stopping server
    [23:04:47] [Server thread/INFO]: Saving players
    [23:04:47] [Server thread/INFO]: Saving worlds
    [23:04:47] [Server thread/INFO]: Saving chunks for level 'Zamin'/Overworld
    [23:04:49] [Server thread/INFO]: Saving chunks for level 'Zamin_nether'/Nether
    [23:04:49] [Server thread/INFO]: Saving chunks for level 'Zamin_the_end'/The End
    
    
    what's wrong?
     
  12. Offline

    Zombie_Striker

    @envic
    The reasons why we don't spoonfeed are listed HERE and HERE. Simply put, we are here to help you, but you need to know what you're doing.

    You are getting this error because you are creating two instances of a class that extends JavaPlugin. There can be only one instance of the main class. Pass the main class to other classes using constructors.
     
  13. Offline

    timtower Administrator Administrator Moderator

    Locked
    Offline mode is not supported
     
Thread Status:
Not open for further replies.

Share This Page