Solved Help I dont know what is my error!

Discussion in 'Plugin Help/Development/Requests' started by Leo38638, Jan 5, 2015.

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

    Leo38638

    Well i made a plugin but when I try to run it it only send me this error and nothing else:
    Code:
    [21:17:29] [Server thread/INFO]: Starting minecraft server version 1.7.10
    [21:17:29] [Server thread/INFO]: Loading properties
    [21:17:29] [Server thread/INFO]: Default game type: SURVIVAL
    [21:17:29] [Server thread/INFO]: This server is running CraftBukkit version git-Spigot-1.7.9-R0.2-208-ge0f2e95 (MC: 1.7.10) (Implementing API version 1.7.10-R0.1-SNAPSHOT)
    [21:17:29] [Server thread/INFO]: Debug logging is disabled
    [21:17:29] [Server thread/INFO]: Server Ping Player Sample Count: 12
    [21:17:29] [Server thread/INFO]: Using 4 threads for Netty based IO
    [21:17:29] [Server thread/INFO]: Generating keypair
    [21:17:29] [Server thread/INFO]: Starting Minecraft server on *:25565
    [21:17:29] [Server thread/INFO]: Set PluginClassLoader as parallel capable
    [21:17:29] [Server thread/INFO]: [Cities] Loading Cities v1.0
    [21:17:29] [Server thread/INFO]: **** Beginning UUID conversion, this may take A LONG time ****
    [21:17:29] [Server thread/INFO]: Preparing level "world"
    [21:17:29] [Server thread/INFO]: -------- World Settings For [world] --------
    [21:17:29] [Server thread/INFO]: View Distance: 10
    [21:17:29] [Server thread/INFO]: Chunks to Grow per Tick: 650
    [21:17:29] [Server thread/INFO]: Clear tick list: false
    [21:17:29] [Server thread/INFO]: Experience Merge Radius: 3.0
    [21:17:29] [Server thread/INFO]: Item Despawn Rate: 6000
    [21:17:29] [Server thread/INFO]: Allow Zombie Pigmen to spawn from portal blocks: true
    [21:17:29] [Server thread/INFO]: Zombie Aggressive Towards Villager: true
    [21:17:29] [Server thread/INFO]: Item Merge Radius: 2.5
    [21:17:29] [Server thread/INFO]: Nerfing mobs spawned from spawners: false
    [21:17:29] [Server thread/INFO]: Cactus Growth Modifier: 100%
    [21:17:29] [Server thread/INFO]: Cane Growth Modifier: 100%
    [21:17:29] [Server thread/INFO]: Melon Growth Modifier: 100%
    [21:17:29] [Server thread/INFO]: Mushroom Growth Modifier: 100%
    [21:17:29] [Server thread/INFO]: Pumpkin Growth Modifier: 100%
    [21:17:29] [Server thread/INFO]: Sapling Growth Modifier: 100%
    [21:17:29] [Server thread/INFO]: Wheat Growth Modifier: 100%
    [21:17:29] [Server thread/INFO]: Entity Activation Range: An 32 / Mo 32 / Mi 16
    [21:17:29] [Server thread/INFO]: Sending up to 5 chunks per packet
    [21:17:29] [Server thread/INFO]: Max Entity Collisions: 8
    [21:17:29] [Server thread/INFO]: Custom Map Seeds:  Village: 10387312 Feature: 14357617
    [21:17:29] [Server thread/INFO]: Mob Spawn Range: 4
    [21:17:29] [Server thread/INFO]: Anti X-Ray: true
    [21:17:29] [Server thread/INFO]:     Engine Mode: 1
    [21:17:29] [Server thread/INFO]:     Hidden Blocks: [14, 15, 16, 21, 48, 49, 54, 56, 73, 74, 82, 129, 130]
    [21:17:29] [Server thread/INFO]:     Replace Blocks: [1, 5]
    [21:17:29] [Server thread/INFO]: Entity Tracking Range: Pl 48 / An 48 / Mo 48 / Mi 32 / Other 64
    [21:17:29] [Server thread/INFO]: Alternative Hopper Ticking: false
    [21:17:29] [Server thread/INFO]: Hopper Transfer: 8 Hopper Check: 8 Hopper Amount: 1
    [21:17:29] [Server thread/INFO]: Random Lighting Updates: false
    [21:17:29] [Server thread/INFO]: Structure Info Saving: true
    [21:17:29] [Server thread/INFO]: Max TNT Explosions: 100
    [21:17:29] [Server thread/INFO]: Arrow Despawn Rate: 1200
    [21:17:29] [Server thread/INFO]: -------- World Settings For [world_nether] --------
    [21:17:29] [Server thread/INFO]: View Distance: 10
    [21:17:29] [Server thread/INFO]: Chunks to Grow per Tick: 650
    [21:17:29] [Server thread/INFO]: Clear tick list: false
    [21:17:29] [Server thread/INFO]: Experience Merge Radius: 3.0
    [21:17:29] [Server thread/INFO]: Item Despawn Rate: 6000
    [21:17:29] [Server thread/INFO]: Allow Zombie Pigmen to spawn from portal blocks: true
    [21:17:29] [Server thread/INFO]: Zombie Aggressive Towards Villager: true
    [21:17:29] [Server thread/INFO]: Item Merge Radius: 2.5
    [21:17:29] [Server thread/INFO]: Nerfing mobs spawned from spawners: false
    [21:17:29] [Server thread/INFO]: Cactus Growth Modifier: 100%
    [21:17:29] [Server thread/INFO]: Cane Growth Modifier: 100%
    [21:17:29] [Server thread/INFO]: Melon Growth Modifier: 100%
    [21:17:29] [Server thread/INFO]: Mushroom Growth Modifier: 100%
    [21:17:29] [Server thread/INFO]: Pumpkin Growth Modifier: 100%
    [21:17:29] [Server thread/INFO]: Sapling Growth Modifier: 100%
    [21:17:29] [Server thread/INFO]: Wheat Growth Modifier: 100%
    [21:17:29] [Server thread/INFO]: Entity Activation Range: An 32 / Mo 32 / Mi 16
    [21:17:29] [Server thread/INFO]: Sending up to 5 chunks per packet
    [21:17:29] [Server thread/INFO]: Max Entity Collisions: 8
    [21:17:29] [Server thread/INFO]: Custom Map Seeds:  Village: 10387312 Feature: 14357617
    [21:17:29] [Server thread/INFO]: Mob Spawn Range: 4
    [21:17:29] [Server thread/INFO]: Anti X-Ray: true
    [21:17:29] [Server thread/INFO]:     Engine Mode: 1
    [21:17:29] [Server thread/INFO]:     Hidden Blocks: [14, 15, 16, 21, 48, 49, 54, 56, 73, 74, 82, 129, 130]
    [21:17:29] [Server thread/INFO]:     Replace Blocks: [1, 5]
    [21:17:29] [Server thread/INFO]: Entity Tracking Range: Pl 48 / An 48 / Mo 48 / Mi 32 / Other 64
    [21:17:29] [Server thread/INFO]: Alternative Hopper Ticking: false
    [21:17:29] [Server thread/INFO]: Hopper Transfer: 8 Hopper Check: 8 Hopper Amount: 1
    [21:17:29] [Server thread/INFO]: Random Lighting Updates: false
    [21:17:29] [Server thread/INFO]: Structure Info Saving: true
    [21:17:29] [Server thread/INFO]: Max TNT Explosions: 100
    [21:17:29] [Server thread/INFO]: Arrow Despawn Rate: 1200
    [21:17:29] [Server thread/INFO]: -------- World Settings For [world_the_end] --------
    [21:17:29] [Server thread/INFO]: View Distance: 10
    [21:17:29] [Server thread/INFO]: Chunks to Grow per Tick: 650
    [21:17:29] [Server thread/INFO]: Clear tick list: false
    [21:17:29] [Server thread/INFO]: Experience Merge Radius: 3.0
    [21:17:29] [Server thread/INFO]: Item Despawn Rate: 6000
    [21:17:29] [Server thread/INFO]: Allow Zombie Pigmen to spawn from portal blocks: true
    [21:17:29] [Server thread/INFO]: Zombie Aggressive Towards Villager: true
    [21:17:29] [Server thread/INFO]: Item Merge Radius: 2.5
    [21:17:29] [Server thread/INFO]: Nerfing mobs spawned from spawners: false
    [21:17:29] [Server thread/INFO]: Cactus Growth Modifier: 100%
    [21:17:29] [Server thread/INFO]: Cane Growth Modifier: 100%
    [21:17:29] [Server thread/INFO]: Melon Growth Modifier: 100%
    [21:17:29] [Server thread/INFO]: Mushroom Growth Modifier: 100%
    [21:17:29] [Server thread/INFO]: Pumpkin Growth Modifier: 100%
    [21:17:29] [Server thread/INFO]: Sapling Growth Modifier: 100%
    [21:17:29] [Server thread/INFO]: Wheat Growth Modifier: 100%
    [21:17:29] [Server thread/INFO]: Entity Activation Range: An 32 / Mo 32 / Mi 16
    [21:17:29] [Server thread/INFO]: Sending up to 5 chunks per packet
    [21:17:29] [Server thread/INFO]: Max Entity Collisions: 8
    [21:17:29] [Server thread/INFO]: Custom Map Seeds:  Village: 10387312 Feature: 14357617
    [21:17:29] [Server thread/INFO]: Mob Spawn Range: 4
    [21:17:29] [Server thread/INFO]: Anti X-Ray: true
    [21:17:29] [Server thread/INFO]:     Engine Mode: 1
    [21:17:29] [Server thread/INFO]:     Hidden Blocks: [14, 15, 16, 21, 48, 49, 54, 56, 73, 74, 82, 129, 130]
    [21:17:29] [Server thread/INFO]:     Replace Blocks: [1, 5]
    [21:17:29] [Server thread/INFO]: Entity Tracking Range: Pl 48 / An 48 / Mo 48 / Mi 32 / Other 64
    [21:17:29] [Server thread/INFO]: Alternative Hopper Ticking: false
    [21:17:29] [Server thread/INFO]: Hopper Transfer: 8 Hopper Check: 8 Hopper Amount: 1
    [21:17:29] [Server thread/INFO]: Random Lighting Updates: false
    [21:17:29] [Server thread/INFO]: Structure Info Saving: true
    [21:17:29] [Server thread/INFO]: Max TNT Explosions: 100
    [21:17:29] [Server thread/INFO]: Arrow Despawn Rate: 1200
    [21:17:29] [Server thread/INFO]: Preparing start region for level 0 (Seed: -2380680396800604470)
    [21:17:30] [Server thread/INFO]: Preparing start region for level 1 (Seed: -2380680396800604470)
    [21:17:31] [Server thread/INFO]: Preparing start region for level 2 (Seed: -2380680396800604470)
    [21:17:31] [Server thread/INFO]: [McMexicoCities] Enabling Cities v1.0
    [21:17:31] [Server thread/INFO]: Plugin Cities Habilitado!
    [21:17:31] [Server thread/WARN]: Server permissions file permissions.yml is not valid YAML.
    java.lang.ClassCastException: java.lang.String cannot be cast to java.util.Map
        at org.bukkit.craftbukkit.v1_7_R4.CraftServer.loadCustomPermissions(CraftServer.java:899) [Spigot.jar:git-Spigot-1.7.9-R0.2-208-ge0f2e95]
        at org.bukkit.craftbukkit.v1_7_R4.CraftServer.enablePlugins(CraftServer.java:405) [Spigot.jar:git-Spigot-1.7.9-R0.2-208-ge0f2e95]
        at net.minecraft.server.v1_7_R4.MinecraftServer.n(MinecraftServer.java:360) [Spigot.jar:git-Spigot-1.7.9-R0.2-208-ge0f2e95]
        at net.minecraft.server.v1_7_R4.MinecraftServer.g(MinecraftServer.java:334) [Spigot.jar:git-Spigot-1.7.9-R0.2-208-ge0f2e95]
        at net.minecraft.server.v1_7_R4.MinecraftServer.a(MinecraftServer.java:290) [Spigot.jar:git-Spigot-1.7.9-R0.2-208-ge0f2e95]
        at net.minecraft.server.v1_7_R4.DedicatedServer.init(DedicatedServer.java:210) [Spigot.jar:git-Spigot-1.7.9-R0.2-208-ge0f2e95]
        at net.minecraft.server.v1_7_R4.MinecraftServer.run(MinecraftServer.java:458) [Spigot.jar:git-Spigot-1.7.9-R0.2-208-ge0f2e95]
        at net.minecraft.server.v1_7_R4.ThreadServerApplication.run(SourceFile:628) [Spigot.jar:git-Spigot-1.7.9-R0.2-208-ge0f2e95]
    [21:17:31] [Server thread/INFO]: Done (1.646s)! For help, type "help" or "?"
    My MainClass:

    Code:
    package tk.cavariux;
    
    import org.bukkit.Bukkit;
    import org.bukkit.plugin.java.JavaPlugin;
    
    
    public class MainClass extends JavaPlugin{
      
        Cities ci = Cities.getInstance();
    
        public static MainClass plugin;
      
        public void onEnable(){
            plugin = this;
            ci.createc("Test", null);
            Bukkit.getLogger().info("Plugin Cities Habilitado!");
        }
      
        public void onDisable(){
            plugin = null;
            Bukkit.getLogger().info("Plugin Cities Deshabilitado!");
        }
      
    }
    
    Help Please

    If you wanna see my other classes ask it on comments
     
  2. Offline

    teej107

     
  3. Offline

    Leo38638

    I dont understand Im some new in this.
     
  4. Offline

    teej107

    @Leo38638 Did you read the stacktrace? What does it say your problem is?
     
  5. Offline

    Leo38638

    Well I have never touch the permissions.yml

    Yep It was one problem I erased it but still other problem:

    Code:
    [21:41:18] [Server thread/INFO]: Hopper Transfer: 8 Hopper Check: 8 Hopper Amount: 1
    [21:41:18] [Server thread/INFO]: Random Lighting Updates: false
    [21:41:18] [Server thread/INFO]: Structure Info Saving: true
    [21:41:18] [Server thread/INFO]: Max TNT Explosions: 100
    [21:41:18] [Server thread/INFO]: -------- World Settings For [world_the_end] --------
    [21:41:18] [Server thread/INFO]: View Distance: 10
    [21:41:18] [Server thread/INFO]: Chunks to Grow per Tick: 650
    [21:41:18] [Server thread/INFO]: Clear tick list: false
    [21:41:18] [Server thread/INFO]: Experience Merge Radius: 3.0
    [21:41:18] [Server thread/INFO]: Nerfing mobs spawned from spawners: false
    [21:41:18] [Server thread/INFO]: Cactus Growth Modifier: 100%
    [21:41:18] [Server thread/INFO]: Cane Growth Modifier: 100%
    [21:41:18] [Server thread/INFO]: Melon Growth Modifier: 100%
    [21:41:18] [Server thread/INFO]: Mushroom Growth Modifier: 100%
    [21:41:18] [Server thread/INFO]: Pumpkin Growth Modifier: 100%
    [21:41:18] [Server thread/INFO]: Sapling Growth Modifier: 100%
    [21:41:18] [Server thread/INFO]: Wheat Growth Modifier: 100%
    [21:41:18] [Server thread/INFO]: Entity Activation Range: An 32 / Mo 32 / Mi 16
    [21:41:18] [Server thread/INFO]: Sending up to 5 chunks per packet
    [21:41:18] [Server thread/INFO]: Max Entity Collisions: 8
    [21:41:18] [Server thread/INFO]: Custom Map Seeds:  Village: 10387312 Feature: 14357617
    [21:41:18] [Server thread/INFO]: Zombie Aggressive Towards Villager: true
    [21:41:18] [Server thread/INFO]: Anti X-Ray: true
    [21:41:18] [Server thread/INFO]:     Engine Mode: 1
    [21:41:18] [Server thread/INFO]:     Hidden Blocks: [14, 15, 16, 21, 48, 49, 54, 56, 73, 74, 82, 129, 130]
    [21:41:18] [Server thread/INFO]:     Replace Blocks: [1, 5]
    [21:41:18] [Server thread/INFO]: Mob Spawn Range: 4
    [21:41:18] [Server thread/INFO]: Arrow Despawn Rate: 1200
    [21:41:18] [Server thread/INFO]: Item Merge Radius: 2.5
    [21:41:18] [Server thread/INFO]: Item Despawn Rate: 6000
    [21:41:18] [Server thread/INFO]: Allow Zombie Pigmen to spawn from portal blocks: true
    [21:41:18] [Server thread/INFO]: Entity Tracking Range: Pl 48 / An 48 / Mo 48 / Mi 32 / Other 64
    [21:41:18] [Server thread/INFO]: Alternative Hopper Ticking: false
    [21:41:18] [Server thread/INFO]: Hopper Transfer: 8 Hopper Check: 8 Hopper Amount: 1
    [21:41:18] [Server thread/INFO]: Random Lighting Updates: false
    [21:41:18] [Server thread/INFO]: Structure Info Saving: true
    [21:41:18] [Server thread/INFO]: Max TNT Explosions: 100
    [21:41:18] [Server thread/ERROR]: Could not load 'plugins\McMexicoCities.jar' in folder 'plugins'
    org.bukkit.plugin.InvalidPluginException: java.lang.ExceptionInInitializerError
        at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:133) ~[Spigot.jar:git-Spigot-1.7.9-R0.2-208-ge0f2e95]
        at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:336) ~[Spigot.jar:git-Spigot-1.7.9-R0.2-208-ge0f2e95]
        at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:258) [Spigot.jar:git-Spigot-1.7.9-R0.2-208-ge0f2e95]
        at org.bukkit.craftbukkit.v1_7_R4.CraftServer.loadPlugins(CraftServer.java:369) [Spigot.jar:git-Spigot-1.7.9-R0.2-208-ge0f2e95]
        at org.bukkit.craftbukkit.v1_7_R4.CraftServer.reload(CraftServer.java:864) [Spigot.jar:git-Spigot-1.7.9-R0.2-208-ge0f2e95]
        at org.bukkit.Bukkit.reload(Bukkit.java:301) [Spigot.jar:git-Spigot-1.7.9-R0.2-208-ge0f2e95]
        at org.bukkit.command.defaults.ReloadCommand.execute(ReloadCommand.java:23) [Spigot.jar:git-Spigot-1.7.9-R0.2-208-ge0f2e95]
        at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:181) [Spigot.jar:git-Spigot-1.7.9-R0.2-208-ge0f2e95]
        at org.bukkit.craftbukkit.v1_7_R4.CraftServer.dispatchCommand(CraftServer.java:767) [Spigot.jar:git-Spigot-1.7.9-R0.2-208-ge0f2e95]
        at org.bukkit.craftbukkit.v1_7_R4.CraftServer.dispatchServerCommand(CraftServer.java:753) [Spigot.jar:git-Spigot-1.7.9-R0.2-208-ge0f2e95]
        at net.minecraft.server.v1_7_R4.DedicatedServer.aB(DedicatedServer.java:326) [Spigot.jar:git-Spigot-1.7.9-R0.2-208-ge0f2e95]
        at net.minecraft.server.v1_7_R4.DedicatedServer.v(DedicatedServer.java:290) [Spigot.jar:git-Spigot-1.7.9-R0.2-208-ge0f2e95]
        at net.minecraft.server.v1_7_R4.MinecraftServer.u(MinecraftServer.java:584) [Spigot.jar:git-Spigot-1.7.9-R0.2-208-ge0f2e95]
        at net.minecraft.server.v1_7_R4.MinecraftServer.run(MinecraftServer.java:490) [Spigot.jar:git-Spigot-1.7.9-R0.2-208-ge0f2e95]
        at net.minecraft.server.v1_7_R4.ThreadServerApplication.run(SourceFile:628) [Spigot.jar:git-Spigot-1.7.9-R0.2-208-ge0f2e95]
    Caused by: java.lang.ExceptionInInitializerError
        at tk.cavariux.MainClass.<init>(MainClass.java:8) ~[?:?]
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:1.7.0_65]
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) ~[?:1.7.0_65]
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) ~[?:1.7.0_65]
        at java.lang.reflect.Constructor.newInstance(Unknown Source) ~[?:1.7.0_65]
        at java.lang.Class.newInstance(Unknown Source) ~[?:1.7.0_65]
        at org.bukkit.plugin.java.PluginClassLoader.<init>(PluginClassLoader.java:76) ~[Spigot.jar:git-Spigot-1.7.9-R0.2-208-ge0f2e95]
        at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:129) ~[Spigot.jar:git-Spigot-1.7.9-R0.2-208-ge0f2e95]
        ... 14 more
    Caused by: java.lang.IllegalArgumentException: Plugin already initialized!
        at org.bukkit.plugin.java.PluginClassLoader.initialize(PluginClassLoader.java:122) ~[Spigot.jar:git-Spigot-1.7.9-R0.2-208-ge0f2e95]
        at org.bukkit.plugin.java.JavaPlugin.<init>(JavaPlugin.java:66) ~[Spigot.jar:git-Spigot-1.7.9-R0.2-208-ge0f2e95]
        at tk.cavariux.Cities.<init>(Cities.java:15) ~[?:?]
        at tk.cavariux.Cities.<clinit>(Cities.java:16) ~[?:?]
        at tk.cavariux.MainClass.<init>(MainClass.java:8) ~[?:?]
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:1.7.0_65]
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) ~[?:1.7.0_65]
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) ~[?:1.7.0_65]
        at java.lang.reflect.Constructor.newInstance(Unknown Source) ~[?:1.7.0_65]
        at java.lang.Class.newInstance(Unknown Source) ~[?:1.7.0_65]
        at org.bukkit.plugin.java.PluginClassLoader.<init>(PluginClassLoader.java:76) ~[Spigot.jar:git-Spigot-1.7.9-R0.2-208-ge0f2e95]
        at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:129) ~[Spigot.jar:git-Spigot-1.7.9-R0.2-208-ge0f2e95]
        ... 14 more
    Caused by: java.lang.IllegalStateException: Initial initialization
        at org.bukkit.plugin.java.PluginClassLoader.initialize(PluginClassLoader.java:125) ~[Spigot.jar:git-Spigot-1.7.9-R0.2-208-ge0f2e95]
        at org.bukkit.plugin.java.JavaPlugin.<init>(JavaPlugin.java:66) ~[Spigot.jar:git-Spigot-1.7.9-R0.2-208-ge0f2e95]
        at tk.cavariux.MainClass.<init>(MainClass.java:6) ~[?:?]
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:1.7.0_65]
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) ~[?:1.7.0_65]
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) ~[?:1.7.0_65]
        at java.lang.reflect.Constructor.newInstance(Unknown Source) ~[?:1.7.0_65]
        at java.lang.Class.newInstance(Unknown Source) ~[?:1.7.0_65]
        at org.bukkit.plugin.java.PluginClassLoader.<init>(PluginClassLoader.java:76) ~[Spigot.jar:git-Spigot-1.7.9-R0.2-208-ge0f2e95]
        at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:129) ~[Spigot.jar:git-Spigot-1.7.9-R0.2-208-ge0f2e95]
        ... 14 more
    [21:41:18] [Server thread/INFO]: Server permissions file permissions.yml is empty, ignoring it
    [21:41:18] [Server thread/INFO]: CONSOLE: [0;32;1mReload complete.[m
    [21:42:17] [Server thread/INFO]: CONSOLE: Stopping the server..[m
    [21:42:17] [Server thread/INFO]: Stopping server
    [21:42:17] [Server thread/INFO]: Saving players
    [21:42:17] [Server thread/INFO]: Saving worlds
    [21:42:17] [Server thread/INFO]: Saving chunks for level 'world'/Overworld
    [21:42:17] [Server thread/INFO]: Saving chunks for level 'world_nether'/Nether
    [21:42:17] [Server thread/INFO]: Saving chunks for level 'world_the_end'/The End
    [21:42:17] [Thread-4/INFO]: Stopping server
    [21:42:17] [Thread-4/INFO]: Saving players
    [21:42:17] [Thread-4/INFO]: Saving worlds
    [21:42:17] [Thread-4/INFO]: Saving chunks for level 'world'/Overworld
    
    It dont tell me which lines and I think my code its ok I mean really wrong that little thing? well it coud be the instances

    <posts merged. Please use the edit button. ~Eya>
     
    Last edited by a moderator: Jan 5, 2015
  6. Offline

    nverdier

    @Leo38638 You created a new instance of the main class, which you can't do. Use constructors instead.
     
  7. Offline

    Leo38638

    Yep Solved my problem but commands not working :V
    (Sry if this is noob, but Im noob on java):

    CommanManager:

    Code:
    package tk.cavariux;
    
    import org.bukkit.ChatColor;
    import org.bukkit.Location;
    import org.bukkit.World;
    import org.bukkit.command.Command;
    import org.bukkit.command.CommandSender;
    import org.bukkit.entity.Player;
    import org.bukkit.plugin.java.JavaPlugin;
    
    
    public class Commands extends JavaPlugin{
     
        Cities ci = Cities.getInstance();
     
        public boolean onCommand(CommandSender sender, Command cmd, String CommandLabel, String[] args) {
            if (!(sender instanceof Player)){
                sender.sendMessage(ChatColor.RED + "Comando solo para jugadores");
                return false;
            }
            if (cmd.getName().equalsIgnoreCase("cities")){
                if (args.length == 0 || args.length > 2){
                    sender.sendMessage(" ");
                    sender.sendMessage(ChatColor.AQUA + "==========" + ChatColor.GOLD + "Ciudades" + ChatColor.AQUA + "==========");
                    sender.sendMessage(ChatColor.RED + "/c:");
                    sender.sendMessage(ChatColor.AQUA + "==========" + ChatColor.AQUA + "========" + ChatColor.AQUA + "==========");
                    sender.sendMessage(" ");
                    return true;
                }
             
                if (args.length == 1){
                    Player p = (Player) sender;
                    if (ci.checker(args[0]) == true){
                     
                        World w = p.getWorld();
                        double x = p.getLocation().getX();
                        double y = p.getLocation().getY();
                        double z = p.getLocation().getZ();
                        float yaw = p.getLocation().getYaw();
                        float pitch = p.getLocation().getPitch(); 
                     
                        w = (World) ci.getfile(args[1], p).get("City.world");
                        x = (double) ci.getfile(args[1], p).get("City.x");
                        y = (double) ci.getfile(args[1], p).get("City.y");
                        z = (double) ci.getfile(args[1], p).get("City.z");
                        yaw = (float) ci.getfile(args[1], p).get("City.yaw");
                        pitch = (float) ci.getfile(args[1], p).get("City.pitch");
                     
                        Location l = new Location(w, x, y, z, yaw, pitch);
                     
                        p.teleport(l);
                        p.sendMessage(ChatColor.AQUA + "Bienvenido a la ciudad " + ChatColor.GOLD + args[0]);
                    }
                    return true;
                }
             
                if (args[0].equalsIgnoreCase("crear")){
                    if (args.length == 2){
                        Player p = (Player) sender;
                     
                        World w = p.getWorld();
                        double x = p.getLocation().getX();
                        double y = p.getLocation().getY();
                        double z = p.getLocation().getZ();
                        float yaw = p.getLocation().getYaw();
                        float pitch = p.getLocation().getPitch();
                     
                        ci.createc(args[1], p);
                        ci.getfile(args[1], p).set("City.world", w);
                        ci.getfile(args[1], p).set("City.x", x);
                        ci.getfile(args[1], p).set("City.y", y);
                        ci.getfile(args[1], p).set("City.z", z);
                        ci.getfile(args[1], p).set("City.yaw", yaw);
                        ci.getfile(args[1], p).set("City.pitch", pitch);
                        return true;
                        }
                    if (args.length == 0 || args.length > 2){
                        sender.sendMessage(ChatColor.RED + "Uso correcto de 'create', uso /c create [Nombre]");
                        return true;
                        }
                    }
             
                if (args[0].equalsIgnoreCase("remove")){
                    Player p = (Player) sender;
                    if (args.length == 2){
                        ci.removec(args[1], p);
                        return true;
                        }
                    if (args.length == 0 || args.length > 2){
                        sender.sendMessage(ChatColor.RED + "Uso correcto de 'create', uso /c borrar [Nombre]");
                        return true;
                        }
                    }
                }
         
            return false;
        }
    }
    
    Plugin.yml:

    name: McMexicoCities
    main: tk.cavariux.MainClass
    version: 1.0
    description: Plugin para, El cual guarda las ciudades y teletransporta a los jugadores a ellas

    commands:
    cities:
    usage: /<command>
    description: Comando General
    aliases: [c, ciudad, city, ciudades, town]
     
  8. Offline

    nverdier

    @Leo38638 It's always best to learn Java before doing anything with Bukkit. Bukkit is simply an implementation of Java, and you don't learn to walk before you learn to crawl. Addressing your problem with commands, is there another stack trace? If so please post it.
     
  9. Offline

    Leo38638

    Yep:
    Code:
    [21:52:22] [Server thread/INFO]: Starting minecraft server version 1.7.10
    [21:52:22] [Server thread/INFO]: Loading properties
    [21:52:22] [Server thread/INFO]: Default game type: SURVIVAL
    [21:52:22] [Server thread/INFO]: This server is running CraftBukkit version git-Spigot-1.7.9-R0.2-208-ge0f2e95 (MC: 1.7.10) (Implementing API version 1.7.10-R0.1-SNAPSHOT)
    [21:52:23] [Server thread/INFO]: Debug logging is disabled
    [21:52:23] [Server thread/INFO]: Server Ping Player Sample Count: 12
    [21:52:23] [Server thread/INFO]: Using 4 threads for Netty based IO
    [21:52:23] [Server thread/INFO]: Generating keypair
    [21:52:23] [Server thread/INFO]: Starting Minecraft server on *:25565
    [21:52:23] [Server thread/INFO]: Set PluginClassLoader as parallel capable
    [21:52:23] [Server thread/INFO]: [McMexicoCities] Loading McMexicoCities v1.0
    [21:52:23] [Server thread/INFO]: **** Beginning UUID conversion, this may take A LONG time ****
    [21:52:23] [Server thread/INFO]: Preparing level "world"
    [21:52:23] [Server thread/INFO]: -------- World Settings For [world] --------
    [21:52:23] [Server thread/INFO]: View Distance: 10
    [21:52:23] [Server thread/INFO]: Chunks to Grow per Tick: 650
    [21:52:23] [Server thread/INFO]: Clear tick list: false
    [21:52:23] [Server thread/INFO]: Experience Merge Radius: 3.0
    [21:52:23] [Server thread/INFO]: Item Merge Radius: 2.5
    [21:52:23] [Server thread/INFO]: Arrow Despawn Rate: 1200
    [21:52:23] [Server thread/INFO]: Allow Zombie Pigmen to spawn from portal blocks: true
    [21:52:23] [Server thread/INFO]: Item Despawn Rate: 6000
    [21:52:23] [Server thread/INFO]: Zombie Aggressive Towards Villager: true
    [21:52:23] [Server thread/INFO]: Alternative Hopper Ticking: false
    [21:52:23] [Server thread/INFO]: Hopper Transfer: 8 Hopper Check: 8 Hopper Amount: 1
    [21:52:23] [Server thread/INFO]: Entity Tracking Range: Pl 48 / An 48 / Mo 48 / Mi 32 / Other 64
    [21:52:23] [Server thread/INFO]: Anti X-Ray: true
    [21:52:23] [Server thread/INFO]:     Engine Mode: 1
    [21:52:23] [Server thread/INFO]:     Hidden Blocks: [14, 15, 16, 21, 48, 49, 54, 56, 73, 74, 82, 129, 130]
    [21:52:23] [Server thread/INFO]:     Replace Blocks: [1, 5]
    [21:52:23] [Server thread/INFO]: Mob Spawn Range: 4
    [21:52:23] [Server thread/INFO]: Random Lighting Updates: false
    [21:52:23] [Server thread/INFO]: Structure Info Saving: true
    [21:52:23] [Server thread/INFO]: Max TNT Explosions: 100
    [21:52:23] [Server thread/INFO]: Nerfing mobs spawned from spawners: false
    [21:52:23] [Server thread/INFO]: Cactus Growth Modifier: 100%
    [21:52:23] [Server thread/INFO]: Cane Growth Modifier: 100%
    [21:52:23] [Server thread/INFO]: Melon Growth Modifier: 100%
    [21:52:23] [Server thread/INFO]: Mushroom Growth Modifier: 100%
    [21:52:23] [Server thread/INFO]: Pumpkin Growth Modifier: 100%
    [21:52:23] [Server thread/INFO]: Sapling Growth Modifier: 100%
    [21:52:23] [Server thread/INFO]: Wheat Growth Modifier: 100%
    [21:52:23] [Server thread/INFO]: Entity Activation Range: An 32 / Mo 32 / Mi 16
    [21:52:23] [Server thread/INFO]: Sending up to 5 chunks per packet
    [21:52:23] [Server thread/INFO]: Max Entity Collisions: 8
    [21:52:23] [Server thread/INFO]: Custom Map Seeds:  Village: 10387312 Feature: 14357617
    [21:52:23] [Server thread/INFO]: -------- World Settings For [world_nether] --------
    [21:52:23] [Server thread/INFO]: View Distance: 10
    [21:52:23] [Server thread/INFO]: Chunks to Grow per Tick: 650
    [21:52:23] [Server thread/INFO]: Clear tick list: false
    [21:52:23] [Server thread/INFO]: Experience Merge Radius: 3.0
    [21:52:23] [Server thread/INFO]: Item Merge Radius: 2.5
    [21:52:23] [Server thread/INFO]: Arrow Despawn Rate: 1200
    [21:52:23] [Server thread/INFO]: Allow Zombie Pigmen to spawn from portal blocks: true
    [21:52:23] [Server thread/INFO]: Item Despawn Rate: 6000
    [21:52:23] [Server thread/INFO]: Zombie Aggressive Towards Villager: true
    [21:52:23] [Server thread/INFO]: Alternative Hopper Ticking: false
    [21:52:23] [Server thread/INFO]: Hopper Transfer: 8 Hopper Check: 8 Hopper Amount: 1
    [21:52:23] [Server thread/INFO]: Entity Tracking Range: Pl 48 / An 48 / Mo 48 / Mi 32 / Other 64
    [21:52:23] [Server thread/INFO]: Anti X-Ray: true
    [21:52:23] [Server thread/INFO]:     Engine Mode: 1
    [21:52:23] [Server thread/INFO]:     Hidden Blocks: [14, 15, 16, 21, 48, 49, 54, 56, 73, 74, 82, 129, 130]
    [21:52:23] [Server thread/INFO]:     Replace Blocks: [1, 5]
    [21:52:23] [Server thread/INFO]: Mob Spawn Range: 4
    [21:52:23] [Server thread/INFO]: Random Lighting Updates: false
    [21:52:23] [Server thread/INFO]: Structure Info Saving: true
    [21:52:23] [Server thread/INFO]: Max TNT Explosions: 100
    [21:52:23] [Server thread/INFO]: Nerfing mobs spawned from spawners: false
    [21:52:23] [Server thread/INFO]: Cactus Growth Modifier: 100%
    [21:52:23] [Server thread/INFO]: Cane Growth Modifier: 100%
    [21:52:23] [Server thread/INFO]: Melon Growth Modifier: 100%
    [21:52:23] [Server thread/INFO]: Mushroom Growth Modifier: 100%
    [21:52:23] [Server thread/INFO]: Pumpkin Growth Modifier: 100%
    [21:52:23] [Server thread/INFO]: Sapling Growth Modifier: 100%
    [21:52:23] [Server thread/INFO]: Wheat Growth Modifier: 100%
    [21:52:23] [Server thread/INFO]: Entity Activation Range: An 32 / Mo 32 / Mi 16
    [21:52:23] [Server thread/INFO]: Sending up to 5 chunks per packet
    [21:52:23] [Server thread/INFO]: Max Entity Collisions: 8
    [21:52:23] [Server thread/INFO]: Custom Map Seeds:  Village: 10387312 Feature: 14357617
    [21:52:23] [Server thread/INFO]: -------- World Settings For [world_the_end] --------
    [21:52:23] [Server thread/INFO]: View Distance: 10
    [21:52:23] [Server thread/INFO]: Chunks to Grow per Tick: 650
    [21:52:23] [Server thread/INFO]: Clear tick list: false
    [21:52:23] [Server thread/INFO]: Experience Merge Radius: 3.0
    [21:52:23] [Server thread/INFO]: Item Merge Radius: 2.5
    [21:52:23] [Server thread/INFO]: Arrow Despawn Rate: 1200
    [21:52:23] [Server thread/INFO]: Allow Zombie Pigmen to spawn from portal blocks: true
    [21:52:23] [Server thread/INFO]: Item Despawn Rate: 6000
    [21:52:23] [Server thread/INFO]: Zombie Aggressive Towards Villager: true
    [21:52:23] [Server thread/INFO]: Alternative Hopper Ticking: false
    [21:52:23] [Server thread/INFO]: Hopper Transfer: 8 Hopper Check: 8 Hopper Amount: 1
    [21:52:23] [Server thread/INFO]: Entity Tracking Range: Pl 48 / An 48 / Mo 48 / Mi 32 / Other 64
    [21:52:23] [Server thread/INFO]: Anti X-Ray: true
    [21:52:23] [Server thread/INFO]:     Engine Mode: 1
    [21:52:23] [Server thread/INFO]:     Hidden Blocks: [14, 15, 16, 21, 48, 49, 54, 56, 73, 74, 82, 129, 130]
    [21:52:23] [Server thread/INFO]:     Replace Blocks: [1, 5]
    [21:52:23] [Server thread/INFO]: Mob Spawn Range: 4
    [21:52:23] [Server thread/INFO]: Random Lighting Updates: false
    [21:52:23] [Server thread/INFO]: Structure Info Saving: true
    [21:52:23] [Server thread/INFO]: Max TNT Explosions: 100
    [21:52:23] [Server thread/INFO]: Nerfing mobs spawned from spawners: false
    [21:52:23] [Server thread/INFO]: Cactus Growth Modifier: 100%
    [21:52:23] [Server thread/INFO]: Cane Growth Modifier: 100%
    [21:52:23] [Server thread/INFO]: Melon Growth Modifier: 100%
    [21:52:23] [Server thread/INFO]: Mushroom Growth Modifier: 100%
    [21:52:23] [Server thread/INFO]: Pumpkin Growth Modifier: 100%
    [21:52:23] [Server thread/INFO]: Sapling Growth Modifier: 100%
    [21:52:23] [Server thread/INFO]: Wheat Growth Modifier: 100%
    [21:52:23] [Server thread/INFO]: Entity Activation Range: An 32 / Mo 32 / Mi 16
    [21:52:23] [Server thread/INFO]: Sending up to 5 chunks per packet
    [21:52:23] [Server thread/INFO]: Max Entity Collisions: 8
    [21:52:23] [Server thread/INFO]: Custom Map Seeds:  Village: 10387312 Feature: 14357617
    [21:52:23] [Server thread/INFO]: Preparing start region for level 0 (Seed: -2380680396800604470)
    [21:52:24] [Server thread/INFO]: Preparing start region for level 1 (Seed: -2380680396800604470)
    [21:52:24] [Server thread/INFO]: Preparing start region for level 2 (Seed: -2380680396800604470)
    [21:52:25] [Server thread/INFO]: [McMexicoCities] Enabling McMexicoCities v1.0
    [21:52:25] [Server thread/INFO]: Plugin Cities de McMexico Habilitado!
    [21:52:25] [Server thread/INFO]: Server permissions file permissions.yml is empty, ignoring it
    [21:52:25] [Server thread/INFO]: Done (1.620s)! For help, type "help" or "?"
    Also im reading a book of Java
     
  10. Offline

    nverdier

  11. Offline

    Leo38638

    Yeah Thats Why O put my Commands Class and my plugin.yml cause theres no crashes but stil not work
     
  12. Offline

    nverdier

    @Leo38638 Is there a message that says "Unknown command. Type "/help" for help."?
     
  13. Offline

    Leo38638

    Dont Worry Solved, My commands where wrong
     
  14. Offline

    nverdier

Thread Status:
Not open for further replies.

Share This Page