ServerPlugin Was bedeutet dieses Problem?

Dieses Thema im Forum "Programmierung" wurde erstellt von Freebuilding, 4. Juli 2013.

  1. Freebuilding
    Offline

    Freebuilding

    Registriert seit:
    2. Oktober 2012
    Beiträge:
    44
    Hey Leute könnt ihr mir sagen was dieser Fehler bedeutet?

    2013-07-04 20:49:50 [SEVERE] Could not load 'plugins\GunGame.jar' in folder 'plugins'
    org.bukkit.plugin.InvalidPluginException: java.lang.ClassNotFoundException: me.riderstorm.GunWar.main
    at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:184)
    at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:305)
    at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:230)
    at org.bukkit.craftbukkit.v1_6_R1.CraftServer.loadPlugins(CraftServer.java:239)
    at org.bukkit.craftbukkit.v1_6_R1.CraftServer.reload(CraftServer.java:603)
    at org.bukkit.Bukkit.reload(Bukkit.java:275)
    at org.bukkit.command.defaults.ReloadCommand.execute(ReloadCommand.java:23)
    at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:189)
    at org.bukkit.craftbukkit.v1_6_R1.CraftServer.dispatchCommand(CraftServer.java:523)
    at org.bukkit.craftbukkit.v1_6_R1.CraftServer.dispatchServerCommand(CraftServer.java:512)
    at net.minecraft.server.v1_6_R1.DedicatedServer.ar(DedicatedServer.java:262)
    at net.minecraft.server.v1_6_R1.DedicatedServer.t(DedicatedServer.java:227)
    at net.minecraft.server.v1_6_R1.MinecraftServer.s(MinecraftServer.java:487)
    at net.minecraft.server.v1_6_R1.MinecraftServer.run(MinecraftServer.java:420)
    at net.minecraft.server.v1_6_R1.ThreadServerApplication.run(SourceFile:582)
    Caused by: java.lang.ClassNotFoundException: me.riderstorm.GunWar.main
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(Unknown Source)
    at org.bukkit.plugin.java.PluginClassLoader.findClass0(PluginClassLoader.java:80)
    at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:53)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Unknown Source)
    at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:173)
    ... 14 more
     
    #1
  2. Plugin00
    Offline

    Plugin00

    Registriert seit:
    3. Februar 2013
    Beiträge:
    71
    Hm,

    Code (Text):
    1. 2013-07-04 20:49:50 [SEVERE] Could not load 'plugins\GunGame.jar' in folder 'plugins'
    Das Plugin könnte nicht geladen werden..
     
    #2
  3. Freebuilding
    Offline

    Freebuilding

    Registriert seit:
    2. Oktober 2012
    Beiträge:
    44
    Das ist klar

    Aber wieso?
     
    #3
  4. games6471
    Offline

    games6471

    Er konnte mindestens eine Klasse nicht finden. Könntest du nicht ein Link zu dem Plugin schicken?

     
    #4
  5. Freebuilding
    Offline

    Freebuilding

    Registriert seit:
    2. Oktober 2012
    Beiträge:
    44
    Die Main

    Code (Text):
    1.  
    2. package me.riderstorm.main;
    3.  
    4. import org.bukkit.Bukkit;
    5. import org.bukkit.Material;
    6. import org.bukkit.Server;
    7. import org.bukkit.configuration.file.FileConfiguration;
    8. import org.bukkit.entity.EntityType;
    9. import org.bukkit.entity.Player;
    10. import org.bukkit.event.EventHandler;
    11. import org.bukkit.event.Listener;
    12. import org.bukkit.event.block.BlockBreakEvent;
    13. import org.bukkit.event.block.BlockPlaceEvent;
    14. import org.bukkit.event.entity.EntityDamageByEntityEvent;
    15. import org.bukkit.event.entity.EntityDamageEvent;
    16. import org.bukkit.event.entity.PlayerDeathEvent;
    17. import org.bukkit.event.entity.ProjectileHitEvent;
    18. import org.bukkit.event.player.PlayerKickEvent;
    19. import org.bukkit.event.player.PlayerLoginEvent;
    20. import org.bukkit.event.player.PlayerQuitEvent;
    21. import org.bukkit.event.player.PlayerRespawnEvent;
    22. import org.bukkit.inventory.ItemStack;
    23. import org.bukkit.inventory.PlayerInventory;
    24.  
    25. public class Event
    26.   implements Listener
    27. {
    28.   private main pl;
    29.  
    30.   public Event(main pl)
    31.   {
    32.     this.pl = pl;
    33.   }
    34.   @EventHandler
    35.   public void onPlayerKill(PlayerDeathEvent e) {
    36.     Player t = e.getEntity().getKiller();
    37.     setWeapon(t);
    38.     downgrade(e.getEntity());
    39.   }
    40.   @EventHandler
    41.   public void onPlayerRespawn(PlayerRespawnEvent e) {
    42.   }
    43.  
    44.   @EventHandler
    45.   public void onPlayerJOIN(PlayerLoginEvent e) {
    46.     if (this.pl.getGameState().equalsIgnoreCase("lobby")) {
    47.       this.pl.broadcast(" " + e.getPlayer().getDisplayName() + " has joined GunGame");
    48.       if (this.pl.getServer().getOnlinePlayers().length >= this.pl.getConfig().getDouble("StartPls"))
    49.         this.pl.start(this.pl.getServer().getOnlinePlayers().length);
    50.     } else {
    51.       e.getPlayer().kickPlayer("Server is Ingame!");
    52.     }
    53.   }
    54.  
    55.   @EventHandler
    56.   public void onPlayerLeave(PlayerQuitEvent e) { e.getPlayer().getInventory().clear(); }
    57.  
    58.   @EventHandler
    59.   public void onPlayerKick(PlayerKickEvent e) {
    60.     e.getPlayer().getInventory().clear();
    61.   }
    62.   @EventHandler
    63.   public void onPlayerPlace(BlockPlaceEvent e) {
    64.     if ((!e.getPlayer().isOp()) || (!e.getPlayer().hasPermission("gg.build")))
    65.       e.setCancelled(true);
    66.   }
    67.  
    68.   @EventHandler
    69.   public void onPlayerBreak(BlockBreakEvent e) {
    70.     if ((!e.getPlayer().isOp()) || (!e.getPlayer().hasPermission("gg.build")))
    71.       e.setCancelled(true);
    72.   }
    73.  
    74.   @EventHandler
    75.   public void onPlayerInteract(EntityDamageByEntityEvent e) {
    76.     Player p = (Player)e.getDamager();
    77.     Player t = (Player)e.getEntity();
    78.     if (p.getInventory().getItemInHand() == new ItemStack(Material.FISHING_ROD)) {
    79.       t.setHealth(0);
    80.       setWeapon(t);
    81.       p.setHealth(0);
    82.     }
    83.   }
    84.  
    85.   @EventHandler
    86.   public void arrow(ProjectileHitEvent e) { if (e.getEntityType() == EntityType.PLAYER) {
    87.       Player p = (Player)e.getEntity();
    88.       Player t = (Player)p.getLastDamageCause().getEntity();
    89.       setWeapon(t);
    90.       p.setHealth(0);
    91.     } }
    92.  
    93.   public void setWeapon(Player t)
    94.   {
    95.     if (t.getInventory().contains(Material.GOLD_SWORD)) {
    96.       t.getInventory().clear();
    97.       t.getInventory().addItem(new ItemStack[] { new ItemStack(Material.WOOD_SWORD, 1) });
    98.     }
    99.     else if (t.getInventory().contains(Material.WOOD_SWORD)) {
    100.       t.getInventory().clear();
    101.       t.getInventory().addItem(new ItemStack[] { new ItemStack(Material.IRON_SWORD, 1) });
    102.     }
    103.     else if (t.getInventory().contains(Material.IRON_SWORD)) {
    104.       t.getInventory().clear();
    105.       t.getInventory().addItem(new ItemStack[] { new ItemStack(Material.DIAMOND_SWORD, 1) });
    106.     }
    107.     else if (t.getInventory().contains(Material.DIAMOND_SWORD)) {
    108.       t.getInventory().clear();
    109.       t.getInventory().addItem(new ItemStack[] { new ItemStack(Material.BOW, 1) });
    110.       t.getInventory().addItem(new ItemStack[] { new ItemStack(Material.ARROW, 1) });
    111.     }
    112.     else if (t.getInventory().contains(Material.BOW)) {
    113.       t.getInventory().clear();
    114.       t.getInventory().addItem(new ItemStack[] { new ItemStack(Material.FISHING_ROD) });
    115.     }
    116.     else if (t.getInventory().contains(Material.FISHING_ROD)) {
    117.       this.pl.broadcast(t.getDisplayName() + " won!");    
    118.       Bukkit.shutdown();
    119.     }
    120.   }
    121.  
    122.   private void downgrade(Player t)
    123.   {
    124.   }
    125. }
    126.  
    127.  
    ~Code-Tags hinzugefügt
     
    #5
  6. BlueFreakLP
    Offline

    BlueFreakLP

    Registriert seit:
    10. Januar 2012
    Beiträge:
    97
    me.riderstorm.GunWar.main
    Das Versucht bukkit zu finden (Steht in der Plugin.yml (Main:))
    package me.riderstorm.main;
    So heisst dein Package anscheinend?
     
    #6
  7. Freebuilding
    Offline

    Freebuilding

    Registriert seit:
    2. Oktober 2012
    Beiträge:
    44
    Jep

    So heißt mein Packet
     
    #7
  8. games6471
    Offline

    games6471

    Die Angabe der Hauptklasse in der plugin.yml muss auch auf deine Hauptklasse zeigen.
     
    #8
  9. Freebuilding
    Offline

    Freebuilding

    Registriert seit:
    2. Oktober 2012
    Beiträge:
    44
    Okay

    Okay, gut danke.
     
    #9