Skocz do zawartości
  • 0

Problem z java.lang.ArrayIndexOutOfBoundsException


Pytanie

Spoiler

package me.neroos.falseandtrue;

import org.bukkit.Bukkit;
import org.bukkit.Material;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.inventory.InventoryClickEvent;
import org.bukkit.inventory.Inventory;
import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.meta.ItemMeta;
import org.bukkit.plugin.java.JavaPlugin;

public class Main extends JavaPlugin implements Listener{
	
	boolean b = true;
	
	ItemStack s = new ItemStack(Material.STONE);{
		ItemMeta im = s.getItemMeta();
		im.setDisplayName("§7§oSTONE §7§o(§c§o64§7§o)");
		s.setItemMeta(im);	
	}
	
	ItemStack d = new ItemStack(Material.DIAMOND); {
		ItemMeta im = d.getItemMeta();
		im.setDisplayName("§b§oDIAMENT §7§o(§c§o64§7§o)");
		d.setItemMeta(im);
		
	}
	
	ItemStack i = new ItemStack(Material.IRON_INGOT);{
		ItemMeta im = i.getItemMeta();
		im.setDisplayName("§8§oZELAZO §7§o(§c§o64§7§o)");
		i.setItemMeta(im);
	}
	
	ItemStack ig = new ItemStack(Material.GOLD_INGOT);{
		ItemMeta im = ig.getItemMeta();
		im.setDisplayName("§e§oZLOTO §7§o(§c§o64§7§o)");
		ig.setItemMeta(im);
	}
	
	ItemStack tnt = new ItemStack(Material.TNT);{
		ItemMeta im = tnt.getItemMeta();
		im.setDisplayName("§4§oTNT §7§o(§c§o64§7§o)");
		tnt.setItemMeta(im);
	}
	
	ItemStack pearl = new ItemStack(Material.ENDER_PEARL);{
		ItemMeta im = pearl.getItemMeta();
		im.setDisplayName("§1§oPERLY §7§o(§c§o12§7§o)");
		pearl.setItemMeta(im);
	}
	
	ItemStack paper = new ItemStack(Material.PAPER);{
		ItemMeta im = paper.getItemMeta();
		im.setDisplayName("§3§oRANGA PREMIUM POTRZEBUJE §c§o-50% §3§oITEMOW");
		paper.setItemMeta(im);
	}
	
	ItemStack em = new ItemStack(Material.EMERALD);{
		ItemMeta im = em.getItemMeta();
		im.setDisplayName("§a§oEMERALD §7§o(§c§o64§7§o)");
		em.setItemMeta(im);
	}
	
	ItemStack gblock = new ItemStack(Material.GOLD_BLOCK);{
		ItemMeta im = gblock.getItemMeta();
		im.setDisplayName("§6§oBLOK ZLOTA §7§o(§c§o64§7§o)");
		gblock.setItemMeta(im);
	}
	
	ItemStack eblock = new ItemStack(Material.EMERALD_BLOCK);{
		ItemMeta im = eblock.getItemMeta();
		im.setDisplayName("§2§oBLOK EMERALDU §7§o(§c§o64§7§o)");
		eblock.setItemMeta(im);
	}
	
	
	
	Inventory inv = Bukkit.createInventory(null, 9, "§d§o§lITEMY NA GILDIE");{
		inv.setItem(0, pearl);
		inv.setItem(1, ig);
		inv.setItem(2, tnt);
		inv.setItem(3, s);
		inv.setItem(4, em);
		inv.setItem(5, paper);
		inv.setItem(6, i);
		inv.setItem(7, d);
		inv.setItem(8, eblock);
		inv.setItem(9, gblock);
	}
		
	
	@Override
	public void onEnable() {
		System.out.println("ON");
		Bukkit.getPluginManager().registerEvents(this, this);
	}
		
	@Override
	public boolean onCommand(CommandSender sender, Command cmd, String l, String[] args) {
		Player p = (Player) sender;
		if(p.hasPermission("neroitemy.stan")) {
			if(cmd.getName().equalsIgnoreCase("NeroItemyONczyOFF")) {
				if(b == true) {
					p.sendMessage(" §a§oWLACZONE");
				}else {
					p.sendMessage(" §c§oWYLACZONE");
					
				}
				
			}
			if(p.hasPermission("neroitemy.on")) {
				if(cmd.getName().equalsIgnoreCase("NeroItemyOFF")) {
					b = false;
					p.sendMessage(" §e§oITEMY NA GILDIE ZOSTALY §c§oWYLACZONE");
				}
				
			}
			if(p.hasPermission("neroitemy.on")) {
				if(cmd.getName().equalsIgnoreCase("NeroItemyON")) {
					b = true;
					p.sendMessage(" §e§oITEMY NA GILDIE ZOSTALY §a§oWLACZONE");
				}
			}
				if(b == true) {
					if(cmd.getName().equalsIgnoreCase("itemy")) {
					p.openInventory(inv);
				}else {
					p.sendMessage("§e§o§lITEMY NA GILDIE SA §c§oWYLACZONE!");
					
				}
			}
			if(cmd.getName().equalsIgnoreCase("ItemyPomoc")) {
				sender.sendMessage("§e §e§o/NeroItemyON §8§o- §c§oWLACZA ITEMY");
				sender.sendMessage("§e §e§o/NeroItemyOFF §8§o- §c§oWYLACZA ITEMY");
				sender.sendMessage("§e §e§o/NeroItemyONczyOFF §8§o- §c§oSPRAWDZA STAN ITEMOW");
				sender.sendMessage("§e §e§o/ITEMY §8§o- §c§oOTWIERA ITEMY");
				
			}
		}
		return false;
	}
	
	@EventHandler
    public void onClick(InventoryClickEvent event){
        Inventory inventory = event.getInventory();
        Player player = (Player) event.getWhoClicked();
        if (inventory.getTitle().equalsIgnoreCase("§d§o§lITEMY NA GILDIE")) {
            event.setCancelled(true);
            player.closeInventory();
        }
	}
}

 

Witam, dlaczego ten kod nie dziala?

Edytowane przez Nioo
Nicku

Zmieniam nazwę tematu.

Notatka dodana przez Nicku

Odnośnik do komentarza
https://skript.pl/temat/27561-problem-z-javalangarrayindexoutofboundsexception/
Udostępnij na innych stronach

Rekomendowane odpowiedzi

  • 0

Widzę, że masz wiele problemów z niedziałającym kodem. Polecam nauczyć się debugować kod i zacząć najlepiej od logów. Tak naprawdę jeśli występuje błąd w kodzie to wywali go w konsoli. Analizowanie niedziałającego pluginu (przynajmniej ja) zawsze zaczynam od konsoli, potem sprawdzam kod i poprawiam błędy. 

Podeślij logi. 

Odnośnik do komentarza
https://skript.pl/temat/27561-problem-z-javalangarrayindexoutofboundsexception/#findComment-182237
Udostępnij na innych stronach

  • 0
Spoiler

******************************         Login Passed... Welcome       ******************************

This Spigot build supports Minecraft clients both of versions 1.7.x and of 1.8.x.
*** It is imperative that backups be taken before running this build on your server! ***
Please report any such issues to http://www.spigotmc.org/, stating your client, server, and if applicable BungeeCord versions.
*** Any bug reports not running the very latest versions of these softwares will be ignored ***


WARNING: This build is more than 2 days old and there are likely updates available!
You will get no support with this build unless you update from http://ci.md-5.net/job/Spigot/
The server will start in 10 seconds!
[20:29:55 INFO]: Starting minecraft server version 1.7.10
[20:29:55 INFO]: Loading properties
[20:29:55 INFO]: Default game type: SURVIVAL
[20:29:56 INFO]: This server is running CraftBukkit version git-Spigot-1646 (MC: 1.7.10) (Implementing API version 1.7.10-R0.1-SNAPSHOT)
[20:29:56 INFO]: Server Ping Player Sample Count: 12
[20:29:56 INFO]: Using 4 threads for Netty based IO
[20:29:56 INFO]: Debug logging is disabled
[20:29:56 INFO]: Generating keypair
[20:29:56 INFO]: Starting Minecraft server on 185.38.248.80:26697
[20:29:57 INFO]: Set PluginClassLoader as parallel capable
[20:29:57 ERROR]: Could not load 'plugins/NeroItemy.jar' in folder 'plugins'
org.bukkit.plugin.InvalidPluginException: java.lang.ArrayIndexOutOfBoundsException: 9
	at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:133) ~[spigot_1.7.10.jar:git-Spigot-1646]
	at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:341) ~[spigot_1.7.10.jar:git-Spigot-1646]
	at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:263) [spigot_1.7.10.jar:git-Spigot-1646]
	at org.bukkit.craftbukkit.v1_7_R4.CraftServer.loadPlugins(CraftServer.java:369) [spigot_1.7.10.jar:git-Spigot-1646]
	at net.minecraft.server.v1_7_R4.DedicatedServer.init(DedicatedServer.java:152) [spigot_1.7.10.jar:git-Spigot-1646]
	at net.minecraft.server.v1_7_R4.MinecraftServer.run(MinecraftServer.java:458) [spigot_1.7.10.jar:git-Spigot-1646]
	at net.minecraft.server.v1_7_R4.ThreadServerApplication.run(SourceFile:628) [spigot_1.7.10.jar:git-Spigot-1646]
Caused by: java.lang.ArrayIndexOutOfBoundsException: 9
	at org.bukkit.craftbukkit.v1_7_R4.inventory.CraftInventoryCustom$MinecraftInventory.setItem(CraftInventoryCustom.java:103) ~[spigot_1.7.10.jar:git-Spigot-1646]
	at org.bukkit.craftbukkit.v1_7_R4.inventory.CraftInventory.setItem(CraftInventory.java:82) ~[spigot_1.7.10.jar:git-Spigot-1646]
	at me.neroos.falseandtrue.Main.<init>(Main.java:93) ~[?:?]
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:1.7.0_151]
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57) ~[?:1.7.0_151]
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[?:1.7.0_151]
	at java.lang.reflect.Constructor.newInstance(Constructor.java:526) ~[?:1.7.0_151]
	at java.lang.Class.newInstance(Class.java:383) ~[?:1.7.0_151]
	at org.bukkit.plugin.java.PluginClassLoader.<init>(PluginClassLoader.java:76) ~[spigot_1.7.10.jar:git-Spigot-1646]
	at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:129) ~[spigot_1.7.10.jar:git-Spigot-1646]
	... 6 more
[20:29:57 ERROR]: Could not load 'plugins/Skellett.jar' in folder 'plugins'
org.bukkit.plugin.InvalidPluginException: java.lang.UnsupportedClassVersionError: com/gmail/thelimeglass/Skellett : Unsupported major.minor version 52.0
	at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:133) ~[spigot_1.7.10.jar:git-Spigot-1646]
	at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:341) ~[spigot_1.7.10.jar:git-Spigot-1646]
	at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:263) [spigot_1.7.10.jar:git-Spigot-1646]
	at org.bukkit.craftbukkit.v1_7_R4.CraftServer.loadPlugins(CraftServer.java:369) [spigot_1.7.10.jar:git-Spigot-1646]
	at net.minecraft.server.v1_7_R4.DedicatedServer.init(DedicatedServer.java:152) [spigot_1.7.10.jar:git-Spigot-1646]
	at net.minecraft.server.v1_7_R4.MinecraftServer.run(MinecraftServer.java:458) [spigot_1.7.10.jar:git-Spigot-1646]
	at net.minecraft.server.v1_7_R4.ThreadServerApplication.run(SourceFile:628) [spigot_1.7.10.jar:git-Spigot-1646]
Caused by: java.lang.UnsupportedClassVersionError: com/gmail/thelimeglass/Skellett : Unsupported major.minor version 52.0
	at java.lang.ClassLoader.defineClass1(Native Method) ~[?:1.7.0_151]
	at java.lang.ClassLoader.defineClass(ClassLoader.java:803) ~[?:1.7.0_151]
	at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) ~[?:1.7.0_151]
	at java.net.URLClassLoader.defineClass(URLClassLoader.java:442) ~[?:1.7.0_151]
	at java.net.URLClassLoader.access$100(URLClassLoader.java:64) ~[?:1.7.0_151]
	at java.net.URLClassLoader$1.run(URLClassLoader.java:354) ~[?:1.7.0_151]
	at java.net.URLClassLoader$1.run(URLClassLoader.java:348) ~[?:1.7.0_151]
	at java.security.AccessController.doPrivileged(Native Method) ~[?:1.7.0_151]
	at java.net.URLClassLoader.findClass(URLClassLoader.java:347) ~[?:1.7.0_151]
	at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:101) ~[spigot_1.7.10.jar:git-Spigot-1646]
	at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:86) ~[spigot_1.7.10.jar:git-Spigot-1646]
	at java.lang.ClassLoader.loadClass(ClassLoader.java:425) ~[?:1.7.0_151]
	at java.lang.ClassLoader.loadClass(ClassLoader.java:358) ~[?:1.7.0_151]
	at java.lang.Class.forName0(Native Method) ~[?:1.7.0_151]
	at java.lang.Class.forName(Class.java:278) ~[?:1.7.0_151]
	at org.bukkit.plugin.java.PluginClassLoader.<init>(PluginClassLoader.java:64) ~[spigot_1.7.10.jar:git-Spigot-1646]
	at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:129) ~[spigot_1.7.10.jar:git-Spigot-1646]
	... 6 more
[20:29:57 INFO]: [gamemode] Loading gamemode v1.0
[20:29:57 INFO]: [TESTMESSAGE] Loading TESTMESSAGE v1.0
[20:29:57 INFO]: [ChairStairs] Loading ChairStairs v1.1
[20:29:57 INFO]: [HideStream] Loading HideStream v3.8
[20:29:57 INFO]: [test] Loading test v1.0
[20:29:57 INFO]: [thBans] Loading thBans v1.0
[20:29:57 INFO]: [WorldEdit] Loading WorldEdit v5.3
[20:29:57 INFO]: [NoCheatPlus] Loading NoCheatPlus v3.10.10-SNAPSHOT-sMD5NET-b680
[20:29:57 INFO]: [Stone] Loading Stone v1.2
[20:29:57 INFO]: [Skript] Loading Skript v2.1.2
[20:29:57 INFO]: [PermissionsEx] Loading PermissionsEx v1.21.3
[20:29:57 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*!
[20:29:57 INFO]: [BarAPI] Loading BarAPI v3.5
[20:29:57 INFO]: [BossBarSK] Loading BossBarSK v1.666
[20:29:57 INFO]: [WorldGuard] Loading WorldGuard v6.1
[20:29:57 INFO]: [HTTPConsole] Loading HTTPConsole v2.4.0
[20:29:57 INFO]: [AlwaysDay] Loading AlwaysDay v2.2.8
[20:29:57 INFO]: [Message] Loading Message v1.0
[20:29:57 INFO]: [Shopkeepers] Loading Shopkeepers v1.52
[20:29:57 INFO]: [FunnyGuilds] Loading FunnyGuilds v3.9.9.1 Cleaned
[20:29:57 INFO]: [AnimatedMOTD-Bukkit] Loading AnimatedMOTD-Bukkit v2.6
[20:29:57 INFO]: [Teleport] Loading Teleport v1.0
[20:29:57 INFO]: [WildSkript] Loading WildSkript v1.8
[20:29:57 INFO]: [ClearLag] Loading ClearLag v2.9.7
[20:29:57 INFO]: [SkQuery] Loading SkQuery v3.21.4
[20:29:57 INFO]: [ParDragonDropPL] Loading ParDragonDropPL v0.01_BETA
[20:29:57 INFO]: [NeroInfoGracz] Loading NeroInfoGracz v1.0
[20:29:57 INFO]: [Essentials] Loading Essentials v2.13.1
[20:29:57 INFO]: [AuthMe] Loading AuthMe v3.4
[20:29:57 INFO]: [EssentialsChat] Loading EssentialsChat v2.13.1
[20:29:57 WARN]: **** SERVER IS RUNNING IN OFFLINE/INSECURE MODE!
[20:29:57 WARN]: The server will make no attempt to authenticate usernames. Beware.
[20:29:57 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.
[20:29:57 WARN]: To change this, set "online-mode" to "true" in the server.properties file.
[20:29:57 INFO]: **** Beginning UUID conversion, this may take A LONG time ****
[20:29:57 INFO]: Preparing level "world"
[20:29:57 INFO]: -------- World Settings For [world] --------
[20:29:57 INFO]: Mob Spawn Range: 4
[20:29:57 INFO]: Anti X-Ray: true
[20:29:57 INFO]: 	Engine Mode: 1
[20:29:57 INFO]: 	Hidden Blocks: [14, 15, 16, 21, 48, 49, 54, 56, 73, 74, 82, 129, 130]
[20:29:57 INFO]: 	Replace Blocks: [1, 5]
[20:29:57 INFO]: Nerfing mobs spawned from spawners: false
[20:29:57 INFO]: Cactus Growth Modifier: 100%
[20:29:57 INFO]: Cane Growth Modifier: 100%
[20:29:57 INFO]: Melon Growth Modifier: 100%
[20:29:57 INFO]: Mushroom Growth Modifier: 100%
[20:29:57 INFO]: Pumpkin Growth Modifier: 100%
[20:29:57 INFO]: Sapling Growth Modifier: 100%
[20:29:57 INFO]: Wheat Growth Modifier: 100%
[20:29:57 INFO]: Entity Activation Range: An 32 / Mo 32 / Mi 16
[20:29:57 INFO]: Entity Tracking Range: Pl 48 / An 48 / Mo 48 / Mi 32 / Other 64
[20:29:57 INFO]: Alternative Hopper Ticking: false
[20:29:57 INFO]: Hopper Transfer: 8 Hopper Check: 8 Hopper Amount: 1
[20:29:57 INFO]: Random Lighting Updates: false
[20:29:57 INFO]: Structure Info Saving: true
[20:29:57 INFO]: Sending up to 5 chunks per packet
[20:29:57 INFO]: Max Entity Collisions: 8
[20:29:57 INFO]: Custom Map Seeds:  Village: 10387312 Feature: 14357617
[20:29:57 INFO]: Max TNT Explosions: 100
[20:29:57 INFO]: View Distance: 10
[20:29:57 INFO]: Chunks to Grow per Tick: 650
[20:29:57 INFO]: Clear tick list: false
[20:29:57 INFO]: Experience Merge Radius: 3.0
[20:29:57 INFO]: Item Despawn Rate: 6000
[20:29:57 INFO]: Item Merge Radius: 2.5
[20:29:57 INFO]: Arrow Despawn Rate: 1200
[20:29:57 INFO]: Allow Zombie Pigmen to spawn from portal blocks: true
[20:29:57 INFO]: Zombie Aggressive Towards Villager: true
[20:29:57 INFO]: -------- World Settings For [world_the_end] --------
[20:29:57 INFO]: Mob Spawn Range: 4
[20:29:57 INFO]: Anti X-Ray: true
[20:29:57 INFO]: 	Engine Mode: 1
[20:29:57 INFO]: 	Hidden Blocks: [14, 15, 16, 21, 48, 49, 54, 56, 73, 74, 82, 129, 130]
[20:29:57 INFO]: 	Replace Blocks: [1, 5]
[20:29:57 INFO]: Nerfing mobs spawned from spawners: false
[20:29:57 INFO]: Cactus Growth Modifier: 100%
[20:29:57 INFO]: Cane Growth Modifier: 100%
[20:29:57 INFO]: Melon Growth Modifier: 100%
[20:29:57 INFO]: Mushroom Growth Modifier: 100%
[20:29:57 INFO]: Pumpkin Growth Modifier: 100%
[20:29:57 INFO]: Sapling Growth Modifier: 100%
[20:29:57 INFO]: Wheat Growth Modifier: 100%
[20:29:57 INFO]: Entity Activation Range: An 32 / Mo 32 / Mi 16
[20:29:57 INFO]: Entity Tracking Range: Pl 48 / An 48 / Mo 48 / Mi 32 / Other 64
[20:29:57 INFO]: Alternative Hopper Ticking: false
[20:29:57 INFO]: Hopper Transfer: 8 Hopper Check: 8 Hopper Amount: 1
[20:29:57 INFO]: Random Lighting Updates: false
[20:29:57 INFO]: Structure Info Saving: true
[20:29:57 INFO]: Sending up to 5 chunks per packet
[20:29:57 INFO]: Max Entity Collisions: 8
[20:29:57 INFO]: Custom Map Seeds:  Village: 10387312 Feature: 14357617
[20:29:57 INFO]: Max TNT Explosions: 100
[20:29:57 INFO]: View Distance: 10
[20:29:57 INFO]: Chunks to Grow per Tick: 650
[20:29:57 INFO]: Clear tick list: false
[20:29:57 INFO]: Experience Merge Radius: 3.0
[20:29:57 INFO]: Item Despawn Rate: 6000
[20:29:57 INFO]: Item Merge Radius: 2.5
[20:29:57 INFO]: Arrow Despawn Rate: 1200
[20:29:57 INFO]: Allow Zombie Pigmen to spawn from portal blocks: true
[20:29:57 INFO]: Zombie Aggressive Towards Villager: true
[20:29:57 INFO]: Preparing start region for level 0 (Seed: 27594263)
[20:29:58 INFO]: Preparing start region for level 1 (Seed: -2654403999190470028)
[20:29:58 INFO]: [gamemode] Enabling gamemode v1.0
[20:29:58 INFO]: [TESTMESSAGE] Enabling TESTMESSAGE v1.0
[20:29:58 INFO]: [ChairStairs] Enabling ChairStairs v1.1
[20:29:58 INFO]: [HideStream] Enabling HideStream v3.8
[20:29:58 INFO]: [HideStream] Version 3.8 enabled.
[20:29:58 INFO]: [test] Enabling test v1.0
[20:29:58 INFO]: Plugin wlaczony
[20:29:58 INFO]: [thBans] Enabling thBans v1.0
[20:29:58 INFO]: [WorldEdit] Enabling WorldEdit v5.3
[20:29:58 INFO]: WEPIF: Using the Bukkit Permissions API.
[20:29:58 INFO]: [NoCheatPlus] Enabling NoCheatPlus v3.10.10-SNAPSHOT-sMD5NET-b680
[20:29:59 WARN]: [NoCheatPlus]  Check for updates and support at BukkitDev: http://dev.bukkit.org/server-mods/nocheatplus/
[20:29:59 WARN]: [NoCheatPlus]  Development builds (unsupported by the Bukkit Staff, at your own risk): http://ci.md-5.net/job/NoCheatPlus/changes
[20:29:59 WARN]: [NoCheatPlus] Could not set up native access for the server-mod (git-Spigot-1646 (MC: 1.7.10)). Please check for updates and consider to request support.
[20:29:59 WARN]: [NoCheatPlus] Bukkit-API-only access: Some features will likely not function properly, performance might suffer.
[20:29:59 INFO]: [NoCheatPlus] McAccess set to: 1.4.6|1.4.7|1.5.x|1.6.1|1.6.2|? / Bukkit-API
[20:29:59 INFO]: [NoCheatPlus] Added block-info for Minecraft 1.5 blocks.
[20:29:59 INFO]: [NoCheatPlus] Added block-info for Minecraft 1.6.1 blocks.
[20:29:59 INFO]: [NoCheatPlus] Added block-info for Minecraft 1.7.2 blocks.
[20:29:59 INFO]: [NoCheatPlus] Inventory checks: FastConsume is available, disabled InstantEat.
[20:29:59 INFO]: [NoCheatPlus] Version 3.10.10-SNAPSHOT-sMD5NET-b680 is enabled.
[20:29:59 INFO]: [Stone] Enabling Stone v1.2
[20:29:59 INFO]: [Skript] Enabling Skript v2.1.2
[20:30:00 INFO]: [Skript] Loaded a total of 11504 english aliases
[20:30:00 INFO]: [Skript]  ~ created by & © Peter Güttinger aka Njol ~
[20:30:00 INFO]: [PermissionsEx] Enabling PermissionsEx v1.21.3
[20:30:00 INFO]: [PermissionsEx] Initializing file backend
[20:30:00 INFO]: [PermissionsEx] Permissions file successfully reloaded
[20:30:01 INFO]: WEPIF: PermissionsEx detected! Using PermissionsEx for permissions.
[20:30:01 INFO]: [BarAPI] Enabling BarAPI v3.5
[20:30:01 INFO]: [BarAPI] Loaded
[20:30:01 INFO]: [BossBarSK] Enabling BossBarSK v1.666
[20:30:01 INFO]: [WorldGuard] Enabling WorldGuard v6.1
[20:30:01 INFO]: [WorldGuard] (world) TNT ignition is PERMITTED.
[20:30:01 INFO]: [WorldGuard] (world) Lighters are PERMITTED.
[20:30:01 INFO]: [WorldGuard] (world) Lava fire is blocked.
[20:30:01 INFO]: [WorldGuard] (world) Fire spread is UNRESTRICTED.
[20:30:01 INFO]: [WorldGuard] Loaded configuration for world 'world'
[20:30:01 INFO]: [WorldGuard] (world_the_end) TNT ignition is PERMITTED.
[20:30:01 INFO]: [WorldGuard] (world_the_end) Lighters are PERMITTED.
[20:30:01 INFO]: [WorldGuard] (world_the_end) Lava fire is blocked.
[20:30:01 INFO]: [WorldGuard] (world_the_end) Fire spread is UNRESTRICTED.
[20:30:01 INFO]: [WorldGuard] Loaded configuration for world 'world_the_end'
[20:30:01 INFO]: [WorldGuard] Loading region data...
[20:30:01 INFO]: [HTTPConsole] Enabling HTTPConsole v2.4.0
[20:30:01 INFO]: HTTPConsole: Listening for connections on 127.0.0.1:8765
[20:30:01 INFO]: HTTPConsole 2.4.0 is enabled
[20:30:01 INFO]: [AlwaysDay] Enabling AlwaysDay v2.2.8
[20:30:01 INFO]: [AlwaysDay] AlwaysDay v2.2.8 is now enabled.
[20:30:01 INFO]: Please donate at the AlwaysDay page (http://dev.bukkit.org/server-mods/always-day/) if you are enjoying this plugin! Any contributions are greatly appreciated!
[20:30:01 INFO]: [Message] Enabling Message v1.0
[20:30:01 INFO]: [Shopkeepers] Enabling Shopkeepers v1.52
[20:30:01 INFO]: [FunnyGuilds] Enabling FunnyGuilds v3.9.9.1 Cleaned
[20:30:01 INFO]: [FunnyGuilds] Available Processors: 24
[20:30:01 INFO]: [FunnyGuilds] Active Threads: 17
[20:30:01 INFO]: [FunnyGuilds] Loaded users: 18
[20:30:01 INFO]: [FunnyGuilds] Loaded regions: 1
[20:30:01 INFO]: [FunnyGuilds] Loaded guilds: 1
[20:30:01 INFO]: [FunnyGuilds] ~ Created by & © Dzikoysk ~
[20:30:01 INFO]: [AnimatedMOTD-Bukkit] Enabling AnimatedMOTD-Bukkit v2.6
[20:30:01 INFO]: [AnimatedMOTD-Bukkit] Successfully injected custom packets!
[20:30:01 INFO]: [AnimatedMOTD-Bukkit] Successfully registered variables!
[20:30:02 INFO]: [AnimatedMOTD-Bukkit] Creating new Core instance
[20:30:02 INFO]: [Teleport] Enabling Teleport v1.0
[20:30:02 INFO]: [WildSkript] Enabling WildSkript v1.8
[20:30:02 INFO]: [WildSkript] skQuery hooked!
[20:30:02 INFO]: [WildSkript] Classes, Events, Conditions, Effects, Expressions and EventValues have been registered!
[20:30:02 INFO]: [WildSkript] Objects and Complex have been registered!
[20:30:02 INFO]: [WildSkript] ~ Created by & © Dzikoysk ~
[20:30:02 INFO]: [ClearLag] Enabling ClearLag v2.9.7
[20:30:02 WARN]: [PermissionsEx] An update to PermissionsEx version 1.23.4 is available to download from http://dev.bukkit.org/bukkit-plugins/permissionsex/. Please review the changes and update as soon as possible!
[20:30:02 INFO]: [ClearLag] Loading modules...
[20:30:02 INFO]: [ClearLag] Modules enabed, loading config values
[20:30:02 WARN]: [ClearLag] Invalid entity type specified path="area-filter" value=ARMOR_STAND
[20:30:02 WARN]: [ClearLag] Invalid entity type specified path="kill-mobs.mob-filter" value=ARMOR_STAND
[20:30:02 INFO]: [ClearLag] Modules have been loaded!
[20:30:02 INFO]: [ClearLag] Clearlag is now enabled!
[20:30:02 INFO]: [ClearLag] Checking for updates compatible with your bukkit version [1.7]...
[20:30:02 INFO]: [SkQuery] Enabling SkQuery v3.21.4
[20:30:02 INFO]: [skQuery] Snooping enabled from com.w00tmast3r.skquery.SkQuery
[20:30:02 INFO]: [skQuery] Locating classes from SkQuery...
[20:30:02 INFO]: [FunnyGuilds][Updater] > 
[20:30:02 INFO]: [FunnyGuilds][Updater] > Available is new version of FunnyGuilds!
[20:30:02 INFO]: [FunnyGuilds][Updater] > Current: 3.9.9.1 Cleaned
[20:30:02 INFO]: [FunnyGuilds][Updater] > Latest: 4.3.0 Tribute
[20:30:02 INFO]: [FunnyGuilds][Updater] > 
[20:30:02 INFO]: [skQuery] Finished snooping of SkQuery with 163 classes.
[20:30:02 INFO]: [skQuery] Beginning to process a total of 163 from SkQuery
[20:30:02 INFO]: [skQuery] Out of 163 classes, 156 classes were loaded from SkQuery
[20:30:02 INFO]: [ParDragonDropPL] Enabling ParDragonDropPL v0.01_BETA
[20:30:02 INFO]: ParDragonDropPL >> Plugin zostal wlaczony: Poprawnie!
[20:30:02 INFO]: [NeroInfoGracz] Enabling NeroInfoGracz v1.0
[20:30:02 INFO]: PLUGIN [INFO-GRACZE] ZOSTAL WLACZONY!
[20:30:02 INFO]: [ClearLag] No updates found!
[20:30:02 INFO]: [Essentials] Enabling Essentials v2.13.1
[20:30:02 INFO]: Bukkit version format changed. Version not checked.
[20:30:02 INFO]: git-Spigot-1646 (MC: 1.7.10)
[20:30:02 INFO]: 1.7.10-R0.1-SNAPSHOT
[20:30:02 INFO]: Using locale pl
[20:30:02 INFO]: Using locale pl
[20:30:03 INFO]: Essentials: Using PermissionsEx based permissions.
[20:30:03 INFO]: [AuthMe] Enabling AuthMe v3.4
[20:30:03 INFO]: [AuthMe] Loading Configuration File...
[20:30:03 INFO]: [AuthMe] Set Language: en
[20:30:03 INFO]: [AuthMe] Hook with Essentials plugin
[20:30:03 INFO]: [AuthMe] LICENSE : This product includes GeoLite data created by MaxMind, available from http://www.maxmind.com
[20:30:03 INFO]: [AuthMe] Authme 3.4 enabled
[20:30:03 INFO]: [EssentialsChat] Enabling EssentialsChat v2.13.1
[20:30:03 INFO]: Server permissions file permissions.yml is empty, ignoring it
[20:30:03 INFO]: Done (5.801s)! For help, type "help" or "?"
[20:30:03 INFO]: Starting GS4 status listener
[20:30:03 INFO]: Starting remote control listener
[20:30:03 INFO]: Query running on 185.38.248.80:26697
[20:30:03 WARN]: No rcon password set in '/home/data/sirconnon/698492.wom/server.properties', rcon disabled!
[20:30:03 INFO]: [HideStream] Running updater ..
[20:30:03 INFO]: [NoCheatPlus] Post-enable running...
[20:30:03 INFO]: [HideStream] No update was found.
[20:30:03 INFO]: [NoCheatPlus] Post-enable finished.
[20:30:03 INFO]: [Skript] Checking for the latest version of Skript...
[20:30:04 INFO]: [Skript] You're currently running the latest stable version of Skript.
[20:30:07 WARN]: [Skript] Using an ID instead of an alias is discouraged and will likely not be supported in future versions of Skript anymore. Please replace '12' with e.g. 'sand'. (Craftingi.sk, line 2: register new shaped recipe for sand named "&b&oSANDFARMER" using 12, 12, 12, 12, 322:1, 12, 12, 12, 12')
[20:30:07 WARN]: [Skript] Using an ID instead of an alias is discouraged and will likely not be supported in future versions of Skript anymore. Please replace '12' with e.g. 'sand'. (Craftingi.sk, line 2: register new shaped recipe for sand named "&b&oSANDFARMER" using 12, 12, 12, 12, 322:1, 12, 12, 12, 12')
[20:30:07 WARN]: [Skript] Using an ID instead of an alias is discouraged and will likely not be supported in future versions of Skript anymore. Please replace '12' with e.g. 'sand'. (Craftingi.sk, line 2: register new shaped recipe for sand named "&b&oSANDFARMER" using 12, 12, 12, 12, 322:1, 12, 12, 12, 12')
[20:30:07 WARN]: [Skript] Using an ID instead of an alias is discouraged and will likely not be supported in future versions of Skript anymore. Please replace '12' with e.g. 'sand'. (Craftingi.sk, line 2: register new shaped recipe for sand named "&b&oSANDFARMER" using 12, 12, 12, 12, 322:1, 12, 12, 12, 12')
[20:30:07 WARN]: [Skript] Using an ID instead of an alias is discouraged and will likely not be supported in future versions of Skript anymore. Please replace '322:1' with e.g. 'enchanted golden apple'. (Craftingi.sk, line 2: register new shaped recipe for sand named "&b&oSANDFARMER" using 12, 12, 12, 12, 322:1, 12, 12, 12, 12')
[20:30:07 WARN]: [Skript] Using an ID instead of an alias is discouraged and will likely not be supported in future versions of Skript anymore. Please replace '12' with e.g. 'sand'. (Craftingi.sk, line 2: register new shaped recipe for sand named "&b&oSANDFARMER" using 12, 12, 12, 12, 322:1, 12, 12, 12, 12')
[20:30:07 WARN]: [Skript] Using an ID instead of an alias is discouraged and will likely not be supported in future versions of Skript anymore. Please replace '12' with e.g. 'sand'. (Craftingi.sk, line 2: register new shaped recipe for sand named "&b&oSANDFARMER" using 12, 12, 12, 12, 322:1, 12, 12, 12, 12')
[20:30:07 WARN]: [Skript] Using an ID instead of an alias is discouraged and will likely not be supported in future versions of Skript anymore. Please replace '12' with e.g. 'sand'. (Craftingi.sk, line 2: register new shaped recipe for sand named "&b&oSANDFARMER" using 12, 12, 12, 12, 322:1, 12, 12, 12, 12')
[20:30:07 WARN]: [Skript] Using an ID instead of an alias is discouraged and will likely not be supported in future versions of Skript anymore. Please replace '12' with e.g. 'sand'. (Craftingi.sk, line 2: register new shaped recipe for sand named "&b&oSANDFARMER" using 12, 12, 12, 12, 322:1, 12, 12, 12, 12')
[20:30:07 WARN]: [Skript] Using an ID instead of an alias is discouraged and will likely not be supported in future versions of Skript anymore. Please replace '49' with e.g. 'obsidian'. (Craftingi.sk, line 5: register new shaped recipe for obsidian named "&b&oBOYFARMER" using 49, 49, 49, 49, 322:1, 49, 49, 49, 49')
[20:30:07 WARN]: [Skript] Using an ID instead of an alias is discouraged and will likely not be supported in future versions of Skript anymore. Please replace '49' with e.g. 'obsidian'. (Craftingi.sk, line 5: register new shaped recipe for obsidian named "&b&oBOYFARMER" using 49, 49, 49, 49, 322:1, 49, 49, 49, 49')
[20:30:07 WARN]: [Skript] Using an ID instead of an alias is discouraged and will likely not be supported in future versions of Skript anymore. Please replace '49' with e.g. 'obsidian'. (Craftingi.sk, line 5: register new shaped recipe for obsidian named "&b&oBOYFARMER" using 49, 49, 49, 49, 322:1, 49, 49, 49, 49')
[20:30:07 WARN]: [Skript] Using an ID instead of an alias is discouraged and will likely not be supported in future versions of Skript anymore. Please replace '49' with e.g. 'obsidian'. (Craftingi.sk, line 5: register new shaped recipe for obsidian named "&b&oBOYFARMER" using 49, 49, 49, 49, 322:1, 49, 49, 49, 49')
[20:30:07 WARN]: [Skript] Using an ID instead of an alias is discouraged and will likely not be supported in future versions of Skript anymore. Please replace '322:1' with e.g. 'enchanted golden apple'. (Craftingi.sk, line 5: register new shaped recipe for obsidian named "&b&oBOYFARMER" using 49, 49, 49, 49, 322:1, 49, 49, 49, 49')
[20:30:07 WARN]: [Skript] Using an ID instead of an alias is discouraged and will likely not be supported in future versions of Skript anymore. Please replace '49' with e.g. 'obsidian'. (Craftingi.sk, line 5: register new shaped recipe for obsidian named "&b&oBOYFARMER" using 49, 49, 49, 49, 322:1, 49, 49, 49, 49')
[20:30:07 WARN]: [Skript] Using an ID instead of an alias is discouraged and will likely not be supported in future versions of Skript anymore. Please replace '49' with e.g. 'obsidian'. (Craftingi.sk, line 5: register new shaped recipe for obsidian named "&b&oBOYFARMER" using 49, 49, 49, 49, 322:1, 49, 49, 49, 49')
[20:30:07 WARN]: [Skript] Using an ID instead of an alias is discouraged and will likely not be supported in future versions of Skript anymore. Please replace '49' with e.g. 'obsidian'. (Craftingi.sk, line 5: register new shaped recipe for obsidian named "&b&oBOYFARMER" using 49, 49, 49, 49, 322:1, 49, 49, 49, 49')
[20:30:07 WARN]: [Skript] Using an ID instead of an alias is discouraged and will likely not be supported in future versions of Skript anymore. Please replace '49' with e.g. 'obsidian'. (Craftingi.sk, line 5: register new shaped recipe for obsidian named "&b&oBOYFARMER" using 49, 49, 49, 49, 322:1, 49, 49, 49, 49')
[20:30:07 WARN]: [Skript] Using an ID instead of an alias is discouraged and will likely not be supported in future versions of Skript anymore. Please replace '1' with e.g. 'stone'. (Craftingi.sk, line 8: register new shaped recipe for stone named "&b&oKOPACZ FOSY"  using 1, 1, 1, 1, 278, 1, 1, 1, 1')
[20:30:07 WARN]: [Skript] Using an ID instead of an alias is discouraged and will likely not be supported in future versions of Skript anymore. Please replace '1' with e.g. 'stone'. (Craftingi.sk, line 8: register new shaped recipe for stone named "&b&oKOPACZ FOSY"  using 1, 1, 1, 1, 278, 1, 1, 1, 1')
[20:30:07 WARN]: [Skript] Using an ID instead of an alias is discouraged and will likely not be supported in future versions of Skript anymore. Please replace '1' with e.g. 'stone'. (Craftingi.sk, line 8: register new shaped recipe for stone named "&b&oKOPACZ FOSY"  using 1, 1, 1, 1, 278, 1, 1, 1, 1')
[20:30:07 WARN]: [Skript] Using an ID instead of an alias is discouraged and will likely not be supported in future versions of Skript anymore. Please replace '1' with e.g. 'stone'. (Craftingi.sk, line 8: register new shaped recipe for stone named "&b&oKOPACZ FOSY"  using 1, 1, 1, 1, 278, 1, 1, 1, 1')
[20:30:07 WARN]: [Skript] Using an ID instead of an alias is discouraged and will likely not be supported in future versions of Skript anymore. Please replace '278' with e.g. 'diamond pickaxe'. (Craftingi.sk, line 8: register new shaped recipe for stone named "&b&oKOPACZ FOSY"  using 1, 1, 1, 1, 278, 1, 1, 1, 1')
[20:30:07 WARN]: [Skript] Using an ID instead of an alias is discouraged and will likely not be supported in future versions of Skript anymore. Please replace '1' with e.g. 'stone'. (Craftingi.sk, line 8: register new shaped recipe for stone named "&b&oKOPACZ FOSY"  using 1, 1, 1, 1, 278, 1, 1, 1, 1')
[20:30:07 WARN]: [Skript] Using an ID instead of an alias is discouraged and will likely not be supported in future versions of Skript anymore. Please replace '1' with e.g. 'stone'. (Craftingi.sk, line 8: register new shaped recipe for stone named "&b&oKOPACZ FOSY"  using 1, 1, 1, 1, 278, 1, 1, 1, 1')
[20:30:07 WARN]: [Skript] Using an ID instead of an alias is discouraged and will likely not be supported in future versions of Skript anymore. Please replace '1' with e.g. 'stone'. (Craftingi.sk, line 8: register new shaped recipe for stone named "&b&oKOPACZ FOSY"  using 1, 1, 1, 1, 278, 1, 1, 1, 1')
[20:30:07 WARN]: [Skript] Using an ID instead of an alias is discouraged and will likely not be supported in future versions of Skript anymore. Please replace '1' with e.g. 'stone'. (Craftingi.sk, line 8: register new shaped recipe for stone named "&b&oKOPACZ FOSY"  using 1, 1, 1, 1, 278, 1, 1, 1, 1')
[20:30:17 ERROR]: [Skript] 'if {czas.%{gracze}%}' is not an entity type (kity.sk, line 146: if {czas.%{gracze}%} = 0')
[20:30:17 ERROR]: [Skript] 'stop' is not a boolean (yes/no) (kity.sk, line 148: stop')
[20:30:17 WARN]: [Skript] Using an ID instead of an alias is discouraged and will likely not be supported in future versions of Skript anymore. Please replace '322:0' with e.g. 'golden apple item'. (limit.sk, line 2: if amount of 322:0 in player's inventory is greater than 12:')
[20:30:17 WARN]: [Skript] Using an ID instead of an alias is discouraged and will likely not be supported in future versions of Skript anymore. Please replace '322:0' with e.g. 'golden apple item'. (limit.sk, line 3: set {_amount} to amount of 322:0 in player's inventory')
[20:30:17 WARN]: [Skript] Using an ID instead of an alias is discouraged and will likely not be supported in future versions of Skript anymore. Please replace '322:0' with e.g. 'golden apple item'. (limit.sk, line 7: remove all 322:0 from player's inventory')
[20:30:17 WARN]: [Skript] Using an ID instead of an alias is discouraged and will likely not be supported in future versions of Skript anymore. Please replace '322:0' with e.g. 'golden apple item'. (limit.sk, line 8: add 12 322:0 to player's inventory')
[20:30:25 WARN]: [Skript] Possible name conflict of variables {stone::*} and {stone::%player%} (there might be more conflicts). (topki.sk, line 56: set {_r1} to size of {stone::*}')
[20:30:25 WARN]: [Skript] Possible name conflict of variables {obs::*} and {obs::%player%} (there might be more conflicts). (topki.sk, line 74: set {_r2} to size of {obs::*}')
[20:30:25 WARN]: [Skript] Possible name conflict of variables {refy::*} and {refy::%player%} (there might be more conflicts). (topki.sk, line 92: set {_refy2} to size of {refy::*}')
[20:30:25 WARN]: [Skript] Possible name conflict of variables {case::*} and {case::%player%} (there might be more conflicts). (topki.sk, line 110: set {_case2} to size of {case::*}')
[20:30:25 WARN]: [Skript] Possible name conflict of variables {damage::*} and {damage::%player%} (there might be more conflicts). (topki.sk, line 128: set {_damage2} to size of {damage::*}')
[20:30:25 WARN]: [Skript] Possible name conflict of variables {koxy::*} and {koxy::%player%} (there might be more conflicts). (topki.sk, line 146: set {_koxy2} to size of {koxy::*}')
[20:30:25 WARN]: [Skript] Possible name conflict of variables {kille::*} and {kille::%player%} (there might be more conflicts). (topki.sk, line 164: set {_r3} to size of {kille::*}')
[20:30:25 WARN]: [Skript] Possible name conflict of variables {czas::*} and {czas::%loop-player%} (there might be more conflicts). (topki.sk, line 182: set {_r4} to size of {czas::*}')
[20:30:25 INFO]: [Skript] Loaded 15 scripts with a total of 30 triggers and 35 commands in 21.48 seconds
[20:30:25 INFO]: [Skript] Finished loading.
[20:30:25 INFO]: [AnimatedMOTD-Bukkit] Running update check
[20:30:25 WARN]: Exception in thread "Craft Scheduler Thread - 6" 
[20:30:25 WARN]: org.apache.commons.lang.UnhandledException: Plugin AnimatedMOTD-Bukkit v2.6 generated an exception while executing task 49
	at org.bukkit.craftbukkit.v1_7_R4.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:56)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1152)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:622)
	at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.NullPointerException
	at net.maciekmm.animatedmotd.b.n.run(n.java:363)
	at org.bukkit.craftbukkit.v1_7_R4.scheduler.CraftTask.run(CraftTask.java:71)
	at org.bukkit.craftbukkit.v1_7_R4.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:53)
	... 3 more

 

@FadexProsze, ale nie wiem czy cos tu znajdziej

 

Edytowane przez Nioo
Odnośnik do komentarza
https://skript.pl/temat/27561-problem-z-javalangarrayindexoutofboundsexception/#findComment-182242
Udostępnij na innych stronach

  • 0
Cytat

[20:29:57 ERROR]: Could not load 'plugins/NeroItemy.jar' in folder 'plugins'
org.bukkit.plugin.InvalidPluginException: java.lang.ArrayIndexOutOfBoundsException: 9
	at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:133) ~[spigot_1.7.10.jar:git-Spigot-1646]
	at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:341) ~[spigot_1.7.10.jar:git-Spigot-1646]
	at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:263) [spigot_1.7.10.jar:git-Spigot-1646]
	at org.bukkit.craftbukkit.v1_7_R4.CraftServer.loadPlugins(CraftServer.java:369) [spigot_1.7.10.jar:git-Spigot-1646]
	at net.minecraft.server.v1_7_R4.DedicatedServer.init(DedicatedServer.java:152) [spigot_1.7.10.jar:git-Spigot-1646]
	at net.minecraft.server.v1_7_R4.MinecraftServer.run(MinecraftServer.java:458) [spigot_1.7.10.jar:git-Spigot-1646]
	at net.minecraft.server.v1_7_R4.ThreadServerApplication.run(SourceFile:628) [spigot_1.7.10.jar:git-Spigot-1646]
Caused by: java.lang.ArrayIndexOutOfBoundsException: 9
	at org.bukkit.craftbukkit.v1_7_R4.inventory.CraftInventoryCustom$MinecraftInventory.setItem(CraftInventoryCustom.java:103) ~[spigot_1.7.10.jar:git-Spigot-1646]
	at org.bukkit.craftbukkit.v1_7_R4.inventory.CraftInventory.setItem(CraftInventory.java:82) ~[spigot_1.7.10.jar:git-Spigot-1646]
	at me.neroos.falseandtrue.Main.<init>(Main.java:93) ~[?:?]
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:1.7.0_151]
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57) ~[?:1.7.0_151]
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[?:1.7.0_151]
	at java.lang.reflect.Constructor.newInstance(Constructor.java:526) ~[?:1.7.0_151]
	at java.lang.Class.newInstance(Class.java:383) ~[?:1.7.0_151]
	at org.bukkit.plugin.java.PluginClassLoader.<init>(PluginClassLoader.java:76) ~[spigot_1.7.10.jar:git-Spigot-1646]
	at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:129) ~[spigot_1.7.10.jar:git-Spigot-1646]
	... 6 more

To jest error-log. Na przyszłość jak będziesz pisał własne pluginy naucz się wpierw debugować i czytać błędy. Jest wiele poradników w internecie ;)

Drastyczny błąd w kodzie. Źle zdefiniowałeś ItemStack'i. 

Twój kod: 

ItemStack s = new ItemStack(Material.STONE);{
		ItemMeta im = s.getItemMeta();
		im.setDisplayName("§7§oSTONE §7§o(§c§o64§7§o)");
		s.setItemMeta(im);	
	}

Musi wyglądać tak (chodzi o nawiasy klamrowe):

ItemStack s = new ItemStack(Material.STONE);
ItemMeta im = s.getItemMeta();
im.setDisplayName("§7§oSTONE §7§o(§c§o64§7§o)");
s.setItemMeta(im);

 

Edytowane przez Fadex
Odnośnik do komentarza
https://skript.pl/temat/27561-problem-z-javalangarrayindexoutofboundsexception/#findComment-182248
Udostępnij na innych stronach

  • 0

@Fadex

	Inventory inv = Bukkit.createInventory(null, 9, "ELO");{
		
	ItemStack s = new ItemStack(Material.STONE);
	ItemMeta im = s.getItemMeta();
	im.setDisplayName("elo");
	s.setItemMeta(im);
	
	}

Chodzi Ci o taki sposob? 

Odnośnik do komentarza
https://skript.pl/temat/27561-problem-z-javalangarrayindexoutofboundsexception/#findComment-182257
Udostępnij na innych stronach

  • 0

Prawie. 

Inventory inv = Bukkit.createInventory(null, 9, "ELO");	

ItemStack s = new ItemStack(Material.STONE);
ItemMeta im = s.getItemMeta();
im.setDisplayName("elo");
s.setItemMeta(im);
	

 

Odnośnik do komentarza
https://skript.pl/temat/27561-problem-z-javalangarrayindexoutofboundsexception/#findComment-182258
Udostępnij na innych stronach

  • 0
4 minuty temu, Fadex napisał:

Przy definiowaniu ItemStack dodaj ilość materiału:


ItemStack s = new ItemStack(Material.STONE, 1);

 

 

31 minut temu, Fadex napisał:

Prawie. 


Inventory inv = Bukkit.createInventory(null, 9, "ELO");	

ItemStack s = new ItemStack(Material.STONE);
ItemMeta im = s.getItemMeta();
im.setDisplayName("elo");
s.setItemMeta(im);
	

 

ehh, nie, nie, nie

to tak samo jakby robil:

static Object something;

static {
	something = new SomeObject();
}

tylko robi to bez static, no i tez moglby w sumie poczytac o modyfikatorach dostepu i zmiennych/fieldach finalnych bo wyglada to dosc brzydko i tez wplywa troche na sam kod,

tak samo te ulozenie klamr itd., niech najlepiej uzywa sobie tego code-style od google: https://github.com/google/styleguide/blob/gh-pages/intellij-java-google-style.xml

no ale watpie ze na razie to ogarnie, niech pierw pouczy sie podstaw.

 

po prostu ustawia item na 9 slot (tak jakby na 10 - dlatego wywala mu blad) - bo bukkit liczy w inventory sloty od 0 do 8 - jeden rząd (0-8)

dlatego wywala mu arrayindexoutofbounds ;/ no i do tego pokazuje to nawet w konsoli dokladnie:

Cytat

Caused by: java.lang.ArrayIndexOutOfBoundsException: 9
	at org.bukkit.craftbukkit.v1_7_R4.inventory.CraftInventoryCustom$MinecraftInventory.setItem(CraftInventoryCustom.java:103) ~[spigot_1.7.10.jar:git-Spigot-1646]
	at org.bukkit.craftbukkit.v1_7_R4.inventory.CraftInventory.setItem(CraftInventory.java:82) ~[spigot_1.7.10.jar:git-Spigot-1646]
	at me.neroos.falseandtrue.Main.<init>(Main.java:93) ~[?:?]

 

wiec wystarczy ze wywalisz:

Cytat

		inv.setItem(9, gblock);

z kodu, bo wtedy bedzie wymagane inventory size o wartosci 9*2, a nie 9.

 

Odnośnik do komentarza
https://skript.pl/temat/27561-problem-z-javalangarrayindexoutofboundsexception/#findComment-182282
Udostępnij na innych stronach

  • 0

@yooniksJak zawsze mi pomozesz :) @FadexTobie tez dziekuje za poswiecony czas. Zapomnialem ze 1 linijka gui liczy sie od 0 do 8, a ja myslalem ze do 9. Takie male bledy :/ Dzieki chlopaki

Odnośnik do komentarza
https://skript.pl/temat/27561-problem-z-javalangarrayindexoutofboundsexception/#findComment-182285
Udostępnij na innych stronach

Nieaktywny
Ten temat został zamknięty. Brak możliwości dodania odpowiedzi.
  • Ostatnio przeglądający   0 użytkowników

    • Brak zarejestrowanych użytkowników przeglądających tę stronę.
×
×
  • Dodaj nową pozycję...