ServerPlugin Problem mit Update auf 1.7 Bitte um dringende Hilfe!

Dieses Thema im Forum "Programmierung" wurde erstellt von MineForce, 29. Dezember 2013.

  1. MineForce
    Offline

    MineForce Gesperrt

    Registriert seit:
    17. Oktober 2012
    Beiträge:
    122
    Hallo Leute,

    ich habe mal mein Plugin auf die Craftbukkit 1.7 geupdatet usw.. nun kommt ein Fehler der so wie ich es verstehe auf das ganz oben mit
    Code (Text):
    1. public class MainClass extends JavaPlugin
    hinweißt.

    Was komisch ist manche Sachen vom Plugin funktionieren und manche nicht.

    Hier Serverkonsole Error:
    Code (Text):
    1. Loading libraries, please wait...
    2. [19:49:52 INFO]: Starting minecraft server version 1.7.2
    3. [19:49:52 INFO]: Loading properties
    4. [19:49:52 INFO]: Default game type: SURVIVAL
    5. [19:49:52 INFO]: Generating keypair
    6. [19:49:52 INFO]: Starting Minecraft server on localhost:25565
    7. [19:49:53 INFO]: This server is running CraftBukkit version git-Bukkit-1.7.2-R0.
    8. 2-3-g530fcb7-b2978jnks (MC: 1.7.2) (Implementing API version 1.7.2-R0.3-SNAPSHOT
    9. )
    10. [19:49:53 INFO]: [CrackShot] Loading CrackShot v0.97.1
    11. [19:49:53 INFO]: [mcore] Loading mcore v7.0.1
    12. [19:49:53 INFO]: [Vault] Loading Vault v1.2.29-b370
    13. [19:49:53 INFO]: [iConomy] Loading iConomy v7.0
    14. [19:49:53 INFO]: [Factions] Loading Factions v2.3.0
    15. [19:49:53 INFO]: [DiscoverZone] Loading DiscoverZone v1.2.0
    16. [19:49:53 INFO]: [mcore] Enabling mcore v7.0.1
    17. [19:49:53 INFO]: [mcore 7.0.1] === ENABLE START ===
    18. [19:49:53 INFO]: [mcore 7.0.1] ºeSetup of SenderIdMixinDefault took ºd9ºems.
    19. [19:49:53 INFO]: [mcore 7.0.1] === ENABLE ºaCOMPLETE ºe(Took ºd110msºe) ===
    20. [19:49:53 INFO]: [Vault] Enabling Vault v1.2.29-b370
    21. [19:49:53 WARN]: iConomy - If you are using Flatfile storage be aware that versi
    22. ons 6, 7 and 8 have a CRITICAL bug which can wipe ALL iconomy data.
    23. [19:49:53 WARN]: if you're using Votifier, or any other plugin which handles eco
    24. nomy data in a threaded manner your server is at risk!
    25. [19:49:53 WARN]: it is highly suggested to use SQL with iCo6 or to use an altern
    26. ative economy plugin!
    27. [19:49:53 INFO]: [Vault][Economy] iConomy 6 found: Waiting
    28. [19:49:53 INFO]: [Vault][Permission] SuperPermissions loaded as backup permissio
    29. n system.
    30. [19:49:53 INFO]: [Vault] Enabled Version 1.2.29-b370
    31. [19:49:53 INFO]: [mcore 7.0.1] ºaActivated ºeintegration with ºdVault
    32. [19:49:53 WARN]: **** SERVER IS RUNNING IN OFFLINE/INSECURE MODE!
    33. [19:49:53 WARN]: The server will make no attempt to authenticate usernames. Bewa
    34. re.
    35. [19:49:53 WARN]: While this makes the game possible to play without internet acc
    36. ess, it also opens up the ability for hackers to connect with any username they
    37. choose.
    38. [19:49:53 WARN]: To change this, set "online-mode" to "true" in the server.prope
    39. rties file.
    40. [19:49:53 INFO]: Preparing level "world"
    41. [19:49:53 INFO]: Preparing start region for level 0 (Seed: 1377002350163878970)
    42. [19:49:54 INFO]: Preparing spawn area: 88%
    43. [19:49:55 INFO]: Preparing start region for level 1 (Seed: 3887866849691367437)
    44. [19:49:55 INFO]: [CrackShot] Enabling CrackShot v0.97.1
    45. [19:49:55 INFO]: [CrackShot] general.yml could not be loaded.
    46. [19:49:55 INFO]: [CrackShot] Gun-mode activated. Boop!
    47. [19:49:55 INFO]: [iConomy] Enabling iConomy v7.0
    48. [19:49:55 INFO]: [iConomy - April Fools] Enabled (22 ms)
    49. [19:49:55 INFO]: [iConomy] Hello, I'm Nijikokun. Yes, this is an April Fools jok
    50. e, but '/money top' was fixed! Enjoy :) - Rare Version!
    51. [19:49:55 INFO]: [Vault][Economy] iConomy 7 hooked.
    52. [19:49:55 INFO]: [Factions] Enabling Factions v2.3.0
    53. [19:49:55 INFO]: [Factions 2.3.0] === ENABLE START ===
    54. [19:49:55 INFO]: [iConomy - April Fools] Purged accounts with default balance.
    55. [19:49:55 INFO]: [Factions 2.3.0] === ENABLE COMPLETE (Took 123ms) ===
    56. [19:49:55 INFO]: [DiscoverZone] Enabling DiscoverZone v1.2.0
    57. [19:49:55 INFO]: [DiscoverZone] Plugin aktiviert
    58. [19:49:55 ERROR]: Error occurred while enabling DiscoverZone v1.2.0 (Is it up to
    59.  date?)
    60. java.lang.IllegalArgumentException: Plugin already intialized!
    61.         at org.bukkit.plugin.java.PluginClassLoader.initialize(PluginClassLoader
    62. .java:98) ~[craftbukkit.jar:git-Bukkit-1.7.2-R0.2-3-g530fcb7-b2978jnks]
    63.         at org.bukkit.plugin.java.JavaPlugin.<init>(JavaPlugin.java:59) ~[craftb
    64. ukkit.jar:git-Bukkit-1.7.2-R0.2-3-g530fcb7-b2978jnks]
    65.         at me.FranTv.DiscoverShop.MainClass.<init>(MainClass.java:73) ~[?:?]
    66.         at GunGame.GunGameKillserie.<init>(GunGameKillserie.java:20) ~[?:?]
    67.         at me.FranTv.DiscoverShop.MainClass.onEnable(MainClass.java:217) ~[?:?]
    68.         at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:250) ~[c
    69. raftbukkit.jar:git-Bukkit-1.7.2-R0.2-3-g530fcb7-b2978jnks]
    70.         at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader
    71. .java:350) [craftbukkit.jar:git-Bukkit-1.7.2-R0.2-3-g530fcb7-b2978jnks]
    72.         at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManage
    73. r.java:384) [craftbukkit.jar:git-Bukkit-1.7.2-R0.2-3-g530fcb7-b2978jnks]
    74.         at org.bukkit.craftbukkit.v1_7_R1.CraftServer.loadPlugin(CraftServer.jav
    75. a:298) [craftbukkit.jar:git-Bukkit-1.7.2-R0.2-3-g530fcb7-b2978jnks]
    76.         at org.bukkit.craftbukkit.v1_7_R1.CraftServer.enablePlugins(CraftServer.
    77. java:280) [craftbukkit.jar:git-Bukkit-1.7.2-R0.2-3-g530fcb7-b2978jnks]
    78.         at net.minecraft.server.v1_7_R1.MinecraftServer.m(MinecraftServer.java:3
    79. 42) [craftbukkit.jar:git-Bukkit-1.7.2-R0.2-3-g530fcb7-b2978jnks]
    80.         at net.minecraft.server.v1_7_R1.MinecraftServer.g(MinecraftServer.java:3
    81. 19) [craftbukkit.jar:git-Bukkit-1.7.2-R0.2-3-g530fcb7-b2978jnks]
    82.         at net.minecraft.server.v1_7_R1.MinecraftServer.a(MinecraftServer.java:2
    83. 75) [craftbukkit.jar:git-Bukkit-1.7.2-R0.2-3-g530fcb7-b2978jnks]
    84.         at net.minecraft.server.v1_7_R1.DedicatedServer.init(DedicatedServer.jav
    85. a:175) [craftbukkit.jar:git-Bukkit-1.7.2-R0.2-3-g530fcb7-b2978jnks]
    86.         at net.minecraft.server.v1_7_R1.MinecraftServer.run(MinecraftServer.java
    87. :424) [craftbukkit.jar:git-Bukkit-1.7.2-R0.2-3-g530fcb7-b2978jnks]
    88.         at net.minecraft.server.v1_7_R1.ThreadServerApplication.run(SourceFile:6
    89. 17) [craftbukkit.jar:git-Bukkit-1.7.2-R0.2-3-g530fcb7-b2978jnks]
    90. Caused by: java.lang.IllegalStateException: Initial initialization
    91.         at org.bukkit.plugin.java.PluginClassLoader.initialize(PluginClassLoader
    92. .java:101) ~[craftbukkit.jar:git-Bukkit-1.7.2-R0.2-3-g530fcb7-b2978jnks]
    93.         at org.bukkit.plugin.java.JavaPlugin.<init>(JavaPlugin.java:59) ~[craftb
    94. ukkit.jar:git-Bukkit-1.7.2-R0.2-3-g530fcb7-b2978jnks]
    95.         at me.FranTv.DiscoverShop.MainClass.<init>(MainClass.java:73) ~[?:?]
    96.         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    97.  ~[?:1.7.0_45]
    98.         at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
    99.  ~[?:1.7.0_45]
    100.         at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Sou
    101. rce) ~[?:1.7.0_45]
    102.         at java.lang.reflect.Constructor.newInstance(Unknown Source) ~[?:1.7.0_4
    103. 5]
    104.         at java.lang.Class.newInstance(Unknown Source) ~[?:1.7.0_45]
    105.         at org.bukkit.plugin.java.PluginClassLoader.<init>(PluginClassLoader.jav
    106. a:52) ~[craftbukkit.jar:git-Bukkit-1.7.2-R0.2-3-g530fcb7-b2978jnks]
    107.         at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.j
    108. ava:133) ~[craftbukkit.jar:git-Bukkit-1.7.2-R0.2-3-g530fcb7-b2978jnks]
    109.         at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.
    110. java:308) ~[craftbukkit.jar:git-Bukkit-1.7.2-R0.2-3-g530fcb7-b2978jnks]
    111.         at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager
    112. .java:231) ~[craftbukkit.jar:git-Bukkit-1.7.2-R0.2-3-g530fcb7-b2978jnks]
    113.         at org.bukkit.craftbukkit.v1_7_R1.CraftServer.loadPlugins(CraftServer.ja
    114. va:255) ~[craftbukkit.jar:git-Bukkit-1.7.2-R0.2-3-g530fcb7-b2978jnks]
    115.         at org.bukkit.craftbukkit.v1_7_R1.CraftServer.<init>(CraftServer.java:23
    116. 3) ~[craftbukkit.jar:git-Bukkit-1.7.2-R0.2-3-g530fcb7-b2978jnks]
    117.         at net.minecraft.server.v1_7_R1.PlayerList.<init>(PlayerList.java:63) ~[
    118. craftbukkit.jar:git-Bukkit-1.7.2-R0.2-3-g530fcb7-b2978jnks]
    119.         at net.minecraft.server.v1_7_R1.DedicatedPlayerList.<init>(SourceFile:14
    120. ) ~[craftbukkit.jar:git-Bukkit-1.7.2-R0.2-3-g530fcb7-b2978jnks]
    121.         at net.minecraft.server.v1_7_R1.DedicatedServer.init(DedicatedServer.jav
    122. a:126) ~[craftbukkit.jar:git-Bukkit-1.7.2-R0.2-3-g530fcb7-b2978jnks]
    123.         ... 2 more
    124. [19:49:55 INFO]: Server permissions file permissions.yml is empty, ignoring it
    125. [19:49:55 INFO]: Done (1.800s)! For help, type "help" or "?"
    126. [19:49:56 INFO]: ----- Bukkit Auto Updater -----
    127. [19:49:56 INFO]: It appears that you're running a Development Build, when you've
    128.  specified in bukkit.yml that you prefer to run Recommended Builds.
    129. [19:49:56 INFO]: If you would like to be kept informed about new Development Bui
    130. ld releases, it is recommended that you change 'preferred-channel' in your bukki
    131. t.yml to 'dev'.
    132. [19:49:56 INFO]: With that set, you will be told whenever a new version is avail
    133. able for download, so that you can always keep up to date and secure with the la
    134. test fixes.
    135. [19:49:56 INFO]: If you would like to disable this warning, simply set 'suggest-
    136. channels' to false in bukkit.yml.
    137. [19:49:56 INFO]: ----- ------------------- -----
    138. [19:49:56 INFO]: [News]: Mit /info findet ihr tolle Dinge!
    139. [19:50:00 INFO]: ***** Vault Version Checker *****
    140. [19:50:00 INFO]: Stable Version: 1.2.29
    141. [19:50:00 INFO]: Current Version: 1.2.29
    142. [19:50:00 INFO]: No new version available
    143. [19:50:00 INFO]: *********************************
    144. >

    Hoffe jemand kann mir helfen. ;(

    Kann warscheinlich auch am OnEnable Teil liegen.

    danke.
     
    #1
  2. MineForce
    Offline

    MineForce Gesperrt

    Registriert seit:
    17. Oktober 2012
    Beiträge:
    122
    Es gibt einen Fortschritt!

    Ich habe mal genau gelesen mir fällt auf das immer die Classen da stehen wo ich oben extends MainClass reingeschrieben habe.

    Kann mir jemand helfen wie ich ArrayLists und HashMaps aus der MainClass in die anderen Classen importiere?
    bzw. wie ich in die MainClass die importiere.

    Grund:

    Ich habe in der MainClass alle ArrayLists und HashMaps und brauche die in verschiedenen Classen also pls help.

    - - - Aktualisiert - - -

    Kann keiner helfen????


    Es reicht ja schon wenn mir jemand sagen kann wie ich das extends umgehe.

    In den anderen Klassen brauche ich die ArrayLists die ich in der MainClass(Hauptklasse) drin habe.
    Diese MainClass "importiere" ich in den anderen Klassen mit extends MainClass hat bis 1.6.4 geklappt nur jetzt nicht mehr.
     
    #2
  3. games6471
    Online

    games6471

    #3
  4. delta242
    Offline

    delta242

    Registriert seit:
    28. Mai 2012
    Beiträge:
    90
    So wie ich das verstehe willst du von anderen Klassen auf die Hauptklasse zugreifen. Das mit Vererbung (-> "extends") zu lösen ist relativ unschön, deshalb gibt es 2 Möglichkeiten, welche die meisten nutzen:
    1. Eine Referenz auf die Hauptklasse in jeder anderen Klasse erstellen. Dazu packst du in jede klasse ein Attribut mit dem Inhalt:
    Code (Text):
    1. private Hauptklasse hauptklasse;
    Diese Referenz musst du jetzt im Konstruktor setzen:
    Code (Text):
    1. public Nebenklasse(Hauptklasse hauptklasse) { this.hauptklasse = hauptklasse; }
    2. Die, in meinen Augen, schönere Methode ist das Singleton: Du erstellst in der Hauptklasse ein statisches Objekt vom Typ der Hauptklasse und setzt es in der onEnable Methode:
    Code (Text):
    1. private static Hauptklasse instance;
    2. public void onEnable() { instance = this; }
    Auf dieses statische Attribut greifst du mit einer öffentlichen Methode namens getInstance() zu:
    Code (Text):
    1. public static Hauptklasse getInstance() { return instance; }
    Jetzt kannst du in den anderen Klassen mit Hauptklasse.getInstance().[...] auf Methoden und Attribute zugreifen.
     
    #4