Register for your free account! | Forgot your password?

Go Back   elitepvpers > Other Online Games > Minecraft
You last visited: Today at 16:03

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



[Coding] Fehler bei ProtocolLib

Discussion on [Coding] Fehler bei ProtocolLib within the Minecraft forum part of the Other Online Games category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Apr 2014
Posts: 22
Received Thanks: 0
Question [Coding] Fehler bei ProtocolLib

Hallo epvp,

ich habe angefangen mich mit ProtocolLib zu beschäftigen und habe mich schon angefangen was zu Coden. Nur bekomme ich jedes mal, wenn ich ein packet senden will folgende Fehlermeldund:

Code:
[18:09:26] [Server thread/ERROR]: Error occurred while enabling Protocol v1 (Is it up to date?)
com.comphenix.protocol.reflect.FieldAccessException: Field index must be within 0 - count
Ich hab mich diesbezüglich schon auf google umgesehen, aber nichts Hilfreiches gefunden.

Freue mich schon auf Antworten.

Grüzle DieSamu
DieSamu is offline  
Old 07/01/2014, 18:41   #2

 
Floppy012's Avatar
 
elite*gold: 36
Join Date: Jun 2013
Posts: 701
Received Thanks: 170
Steht da noch mehr?

Poste hier mal die gesamte Log.

Mit freundlichen Grüßen

Floppy012
Floppy012 is offline  
Old 07/01/2014, 20:27   #3
 
elite*gold: 0
Join Date: Apr 2014
Posts: 22
Received Thanks: 0
hier:

Code:
[18:09:26] [Server thread/ERROR]: Error occurred while enabling Protocol v1 (Is it up to date?)
com.comphenix.protocol.reflect.FieldAccessException: Field index must be within 0 - count
	at com.comphenix.protocol.reflect.StructureModifier.write(StructureModifier.java:285) ~[?:?]
	at de.DieSamu.Protocol.Protocol.onEnable(Protocol.java:27) ~[?:?]
	at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:250) ~[spigot.jar:git-Spigot-1465]
	at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:324) [spigot.jar:git-Spigot-1465]
	at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:405) [spigot.jar:git-Spigot-1465]
	at org.bukkit.craftbukkit.v1_7_R3.CraftServer.loadPlugin(CraftServer.java:467) [spigot.jar:git-Spigot-1465]
	at org.bukkit.craftbukkit.v1_7_R3.CraftServer.enablePlugins(CraftServer.java:385) [spigot.jar:git-Spigot-1465]
	at org.bukkit.craftbukkit.v1_7_R3.CraftServer.reload(CraftServer.java:826) [spigot.jar:git-Spigot-1465]
	at org.bukkit.Bukkit.reload(Bukkit.java:286) [spigot.jar:git-Spigot-1465]
	at org.bukkit.command.defaults.ReloadCommand.execute(ReloadCommand.java:24) [spigot.jar:git-Spigot-1465]
	at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:180) [spigot.jar:git-Spigot-1465]
	at org.bukkit.craftbukkit.v1_7_R3.CraftServer.dispatchCommand(CraftServer.java:728) [spigot.jar:git-Spigot-1465]
	at org.bukkit.craftbukkit.v1_7_R3.CraftServer.dispatchServerCommand(CraftServer.java:715) [spigot.jar:git-Spigot-1465]
	at net.minecraft.server.v1_7_R3.DedicatedServer.aB(DedicatedServer.java:319) [spigot.jar:git-Spigot-1465]
	at net.minecraft.server.v1_7_R3.DedicatedServer.v(DedicatedServer.java:284) [spigot.jar:git-Spigot-1465]
	at net.minecraft.server.v1_7_R3.MinecraftServer.u(MinecraftServer.java:576) [spigot.jar:git-Spigot-1465]
	at net.minecraft.server.v1_7_R3.MinecraftServer.run(MinecraftServer.java:482) [spigot.jar:git-Spigot-1465]
	at net.minecraft.server.v1_7_R3.ThreadServerApplication.run(SourceFile:628) [spigot.jar:git-Spigot-1465]
Caused by: java.lang.IndexOutOfBoundsException: Out of bounds
	... 18 more
Grüzle DieSamu
DieSamu is offline  
Old 07/01/2014, 20:45   #4

 
Floppy012's Avatar
 
elite*gold: 36
Join Date: Jun 2013
Posts: 701
Received Thanks: 170
Quote:
Originally Posted by DieSamu View Post
[18:09:26] [Server thread/ERROR]: Error occurred while enabling Protocol v1 (Is it up to date?)
com.comphenix.protocol.reflect.FieldAccessExceptio n: Field index must be within 0 - count
at com.comphenix.protocol.reflect.StructureModifier.w rite(StructureModifier.java:285) ~[?:?]
at de.DieSamu.Protocol.Protocol.onEnable(Protocol.jav a:27) ~[?:?]
at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaP lugin.java:250) ~[spigot.jar:git-Spigot-1465]
at org.bukkit.plugin.java.JavaPluginLoader.enablePlug in(JavaPluginLoader.java:324) [spigot.jar:git-Spigot-1465]
at org.bukkit.plugin.SimplePluginManager.enablePlugin (SimplePluginManager.java:405) [spigot.jar:git-Spigot-1465]
at org.bukkit.craftbukkit.v1_7_R3.CraftServer.loadPlu gin(CraftServer.java:467) [spigot.jar:git-Spigot-1465]
at org.bukkit.craftbukkit.v1_7_R3.CraftServer.enableP lugins(CraftServer.java:385) [spigot.jar:git-Spigot-1465]
at org.bukkit.craftbukkit.v1_7_R3.CraftServer.reload( CraftServer.java:826) [spigot.jar:git-Spigot-1465]
at org.bukkit.Bukkit.reload(Bukkit.java:286) [spigot.jar:git-Spigot-1465]
at org.bukkit.command.defaults.ReloadCommand.execute( ReloadCommand.java:24) [spigot.jar:git-Spigot-1465]
at org.bukkit.command.SimpleCommandMap.dispatch(Simpl eCommandMap.java:180) [spigot.jar:git-Spigot-1465]
at org.bukkit.craftbukkit.v1_7_R3.CraftServer.dispatc hCommand(CraftServer.java:728) [spigot.jar:git-Spigot-1465]
at org.bukkit.craftbukkit.v1_7_R3.CraftServer.dispatc hServerCommand(CraftServer.java:715) [spigot.jar:git-Spigot-1465]
at net.minecraft.server.v1_7_R3.DedicatedServer.aB(De dicatedServer.java:319) [spigot.jar:git-Spigot-1465]
at net.minecraft.server.v1_7_R3.DedicatedServer.v(Ded icatedServer.java:284) [spigot.jar:git-Spigot-1465]
at net.minecraft.server.v1_7_R3.MinecraftServer.u(Min ecraftServer.java:576) [spigot.jar:git-Spigot-1465]
at net.minecraft.server.v1_7_R3.MinecraftServer.run(M inecraftServer.java:482) [spigot.jar:git-Spigot-1465]
at net.minecraft.server.v1_7_R3.ThreadServerApplicati on.run(SourceFile:628) [spigot.jar:git-Spigot-1465]
Caused by: java.lang.IndexOutOfBoundsException: Out of bounds
... 18 more
Was steht in der Protocol Klasse bei Zeile 27?

Es sieht so aus, als wenn du versuchst einen Wert mit negativem Index (nicht mögl.) aus einer Liste abzurufen.

Mit freundlichen Grüßen

Floppy012
Floppy012 is offline  
Old 07/01/2014, 20:49   #5
 
elite*gold: 0
Join Date: Apr 2014
Posts: 22
Received Thanks: 0
Code:
setXP.getShorts().write(0, (short) Bukkit.getPlayer("DieSamu").getLevel());
DieSamu is offline  
Old 07/01/2014, 22:00   #6
 
strubelz's Avatar
 
elite*gold: 31
Join Date: Jan 2014
Posts: 310
Received Thanks: 55
Die Fehlermeldung bedeutet, das der Viele index (das erste Argument) zwischen 0 und count sein soll (glaube ich) vielleicht solltest du mal schauen ob da vielleicht eine andere Zahl reinmuss.

PS: Ich glaube nich das es eine gute Idee ist während dem enablen einen Player zu fetten, da der ja bei Start noch nicht gejoint sein kann.
strubelz is offline  
Old 07/01/2014, 22:02   #7

 
Floppy012's Avatar
 
elite*gold: 36
Join Date: Jun 2013
Posts: 701
Received Thanks: 170
Prüfst du vorher ob getShorts() den Index 0 beinhaltet? Oder machst du das einfach so? Außerdem müsste getPlayer in der onEnable() method == null sein, da wie strubelz schon sagte, der Spieler noch nicht beigetreten ist. Verwende mal getOfflinePlayer(). Denke auch noch daran, dass du anstelle von Namen, UUIDs verwenden solltest.

Mit freundlichen Grüßen

Floppy012
Floppy012 is offline  
Old 07/01/2014, 23:07   #8
 
Howaner's Avatar
 
elite*gold: 132
Join Date: Apr 2010
Posts: 2,864
Received Thanks: 2,008

Du solltest alle Werte angeben.
Außerdem musst du statt getShorts() getInts() verwenden.
Schau da:
Howaner is offline  
Reply


Similar Threads Similar Threads
Coding Problem bei WBB (CSS-FEHLER?)
12/10/2013 - Metin2 Private Server - 3 Replies
Hallo, Und zwar hab ich ein kleines anliegen bei WBB. Mein Menü ist verschoben und sieht so aus: epvpImg: play less, UPLOAD MOAR! Ich möchte aber dass es so aussieht (habs mit paint gemacht) epvpImg: A picture is worth a thousand words.
Coding Fehler
06/23/2011 - AutoIt - 3 Replies
Hi Leute, ich wollt mal was für 4story machen also hack naja hab zwar die addys ohne probleme bekommen aber ihrgend wie gingen nie die hacks,deswegen hab ich es bei solitär veruscht wie in den tutorials. wenn ich die addy direkt bei ce änder geht es doch mit meinen hack nicht. das ist der Script Code: #RequireAdmin #include <NomadMemory.au3> While 2 ProcessExists("Solitaire.exe")



All times are GMT +1. The time now is 16:04.


Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2026 elitepvpers All Rights Reserved.