ServerPlugin Outadet Geschriebenes EventPlugin bracuhe Hilfe :(

Dieses Thema im Forum "Selbstgeschriebene Plugins | Mods | Programme" wurde erstellt von MineVonika, 12. Januar 2013.

Status des Themas:
Es sind keine weiteren Antworten möglich.
  1. MineVonika
    Offline

    MineVonika

    Registriert seit:
    11. Januar 2013
    Beiträge:
    3
    Hallo Liebe Minecraftler und Entwickler,

    Ich habe ca. vor 6Monaten mit einem Freund ein Plugin geschrieben.
    Dies ging auch Perfekt bis 1.4 nun kann ich es nicht nutzen wegen eines ServerFehlers:


    2013-01-12 01:07:04 [INFO] Starting minecraft server version 1.4.6
    2013-01-12 01:07:04 [INFO] Loading properties
    2013-01-12 01:07:04 [WARNING] server.properties does not exist
    2013-01-12 01:07:04 [INFO] Generating new properties file
    2013-01-12 01:07:04 [INFO] Default game type: SURVIVAL
    2013-01-12 01:07:04 [INFO] Generating keypair
    2013-01-12 01:07:04 [INFO] Starting Minecraft server on *:25565
    2013-01-12 01:07:04 [INFO] This server is running CraftBukkit version git-Bukkit-1.4.6-R0.3-7-g48dcb3e-b2591jnks (MC: 1.4.6) (Implementing API version 1.4.6-R0.4-SNAPSHOT)
    2013-01-12 01:07:04 [SEVERE] Could not load 'plugins\Server-Event-Deutsch.jar' in folder 'plugins'
    org.bukkit.plugin.InvalidPluginException: java.lang.ClassNotFoundException: me.herodennis.mscrew.Grundlage
    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_4_6.CraftServer.loadPlugins(CraftServer.java:239)
    at org.bukkit.craftbukkit.v1_4_6.CraftServer.<init>(CraftServer.java:217)
    at net.minecraft.server.v1_4_6.PlayerList.<init>(PlayerList.java:52)
    at net.minecraft.server.v1_4_6.DedicatedPlayerList.<init>(SourceFile:11)
    at net.minecraft.server.v1_4_6.DedicatedServer.init(DedicatedServer.java:104)
    at net.minecraft.server.v1_4_6.MinecraftServer.run(MinecraftServer.java:399)
    at net.minecraft.server.v1_4_6.ThreadServerApplication.run(SourceFile:849)
    Caused by: java.lang.ClassNotFoundException: me.herodennis.mscrew.Grundlage
    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)
    ... 9 more
    2013-01-12 01:07:04 [INFO] Preparing level "world"
    2013-01-12 01:07:05 [INFO] Preparing start region for level 0 (Seed: 4889824948336734969)
    2013-01-12 01:07:05 [INFO] ----- Bukkit Auto Updater -----
    2013-01-12 01:07:05 [INFO] It appears that you're running a Development Build, when you've specified in bukkit.yml that you prefer to run Recommended Builds.
    2013-01-12 01:07:05 [INFO] If you would like to be kept informed about new Development Build releases, it is recommended that you change 'preferred-channel' in your bukkit.yml to 'dev'.
    2013-01-12 01:07:05 [INFO] With that set, you will be told whenever a new version is available for download, so that you can always keep up to date and secure with the latest fixes.
    2013-01-12 01:07:05 [INFO] If you would like to disable this warning, simply set 'suggest-channels' to false in bukkit.yml.
    2013-01-12 01:07:05 [INFO] ----- ------------------- -----
    2013-01-12 01:07:05 [INFO] Preparing start region for level 1 (Seed: 4889824948336734969)
    2013-01-12 01:07:05 [INFO] Preparing start region for level 2 (Seed: 4889824948336734969)
    2013-01-12 01:07:05 [INFO] Server permissions file permissions.yml is empty, ignoring it
    2013-01-12 01:07:05 [INFO] Done (0,908s)! For help, type "help" or "?"


    Hoffe das kann helfen hier Plugin Script:

    package me.herodennis.event;


    import org.bukkit.Bukkit;
    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 ServerEvent extends JavaPlugin{
    private FileManager fileManager = new FileManager();
    public World welt2;
    @Override
    public void onDisable() {
    // TODO Auto-generated method stub
    System.out.println("ServerEvent-Plugin ist ausgeschaltet");
    }

    @Override
    public void onEnable() {
    fileManager.createConfig();
    // TODO Auto-generated method stub
    System.out.println("[ServerEvent-Plugin] by Herodennis");
    System.out.println("[ServerEvent-Plugin] ist eingeschaltet");
    System.out.println("[ServerEvent-Plugin] Event-Location wurden gefunden");
    System.out.println("[ServerEvent-Plugin] Das Event Plugin wurde erfolreich hochgefahren");
    }
    public boolean onCommand (CommandSender sender, Command cmd, String cmdLabel, String[] args){
    boolean setevent = true;




    Player p = (Player)sender;



    if (cmd.getName() .equalsIgnoreCase("setevent")) {
    if (args.length == 0){
    if(p.isOp() == true){
    FileManager.writedouble("event.x", p.getLocation().getX());
    FileManager.writedouble("event.y", p.getLocation().getY());
    FileManager.writedouble("event.z", p.getLocation().getZ());
    FileManager.writedouble("event.pitch", p.getLocation().getPitch());
    FileManager.writedouble("event.yaw", p.getLocation().getYaw());
    String welt = p.getWorld().toString();
    welt2 = p.getWorld();
    FileManager.writeString("event.world",welt);
    p.sendMessage("§9[Der Spawnpunkt wurde für das Event gesetzt]");
    }

    }
    }
    else if(cmd.getName().equalsIgnoreCase("event")){
    if(args.length == 1){
    if(args[0].equalsIgnoreCase("start")){
    if(p.isOp()){
    FileManager.writeBoolean("event.enable", true);
    Bukkit.broadcastMessage (p.getName() +"§6 hat ein neues Event angekündigt, um zum Event zukommen macht /event join");
    }
    else
    {
    p.sendMessage("§7Es findet gerade kein Event statt!");
    }

    }
    else if(args[0].equalsIgnoreCase("stop")){
    if(p.isOp()){
    FileManager.writeBoolean("event.enable", false);
    Bukkit.broadcastMessage(p.getName() +"§6 hat das aktuelle Event geschlossen, ihr könnt nun das Event verlassen!");
    }
    else
    {
    p.sendMessage("§6 Es findet gerade kein Event statt!");
    }

    }
    else if(args[0].equalsIgnoreCase("newspawn")){
    if(p.isOp()){
    FileManager.writedouble("event.x", p.getLocation().getX());
    FileManager.writedouble("event.y", p.getLocation().getY());
    FileManager.writedouble("event.z", p.getLocation().getZ());
    FileManager.writedouble("event.pitch", p.getLocation().getPitch());
    FileManager.writedouble("event.yaw", p.getLocation().getYaw());
    String welt = p.getWorld().toString();
    welt2 = p.getWorld();
    FileManager.writeString("event.world",welt);
    FileManager.writeBoolean("event.enable", true);
    Bukkit.broadcastMessage(p.getName() +"§6 hat ein neuen Eventspawn gesetzt, um zum neuen Eventspawn zukommen macht /event join");

    }
    }
    else if(args[0].equalsIgnoreCase("join")){
    if(FileManager.readBoolean("event.enable") == true){
    FileManager.reloadConfig();
    Location vec = new Location(welt2,FileManager.readDouble("event.x"),FileManager.readDouble("event.y"),FileManager.readDouble("event.z"));
    p.teleport(vec);
    Bukkit.broadcastMessage("§2[Spieler]§2"+ p.getName() +"§a hat das Event Betreten!");
    }
    else
    {
    p.sendMessage("§7Es findet gerade kein Event statt!");
    }

    }
    }
    }



    return setevent;



    }
    }

    package me.herodennis.event;

    import java.io.File;

    import org.bukkit.World;
    import org.bukkit.configuration.file.YamlConfiguration;

    public class FileManager {

    public static String ordner = "plugins/Event";
    public static File configFile = new File(ordner + File.separator + "config.yml");
    public static YamlConfiguration config;

    private static YamlConfiguration loadConfig()
    {
    try {
    YamlConfiguration config = new YamlConfiguration();
    config.load(configFile);
    return config;
    }catch (Exception e) {
    e.printStackTrace();
    return null;
    }
    }

    public void createConfig() {
    new File(ordner).mkdir();
    if(!configFile.exists()) {
    try {
    configFile.createNewFile();

    config = loadConfig();
    config.set("event.x",0.000);
    config.set("event.y",0.000);
    config.set("event.z",0.000);
    config.set("event.enable",false);
    config.set("event.pitch", 0.000);
    config.set("event.yaw", 0.000);
    config.save(configFile);

    } catch (Exception e) {
    e.printStackTrace();

    }

    }
    config = loadConfig();


    }
    public static void reloadConfig() {
    new File(ordner).mkdir();
    if(!configFile.exists()) {
    try {
    configFile.createNewFile();

    config = loadConfig();
    config.save(configFile);

    } catch (Exception e) {
    e.printStackTrace();

    }

    }
    config = loadConfig();


    }


    public static String read(String key) {
    reloadConfig();
    String value = config.getString(key);
    return value;
    }
    public static int readInt(String key) {
    reloadConfig();
    int value = config.getInt(key);
    return value;
    }
    public static boolean readBoolean(String key) {
    reloadConfig();
    boolean value = config.getBoolean(key);

    return value;
    }
    public static World readWorld(String key) {
    reloadConfig();
    World value = (World) config.get(key);

    return value;
    }
    public static double readDouble(String key) {
    reloadConfig();
    double value = config.getDouble(key);

    return value;
    }
    public static void writeBoolean(String key,Boolean wert){
    if(configFile.exists())
    {
    try {
    config.set(key, wert);
    config.save(configFile);
    } catch (Exception e) {
    e.printStackTrace();

    }
    }

    }
    public static void writedouble(String key,double wert){
    if(configFile.exists())
    {
    try {
    config.set(key, wert);
    config.save(configFile);
    } catch (Exception e) {
    e.printStackTrace();

    }
    }

    }

    public static void writeString(String key,String wert){
    if(configFile.exists())
    {
    try {
    config.set(key, wert);
    config.save(configFile);
    } catch (Exception e) {
    e.printStackTrace();

    }
    }

    }
    }

    Hoffe das ihr eine Idee habt das das wieder für 1.4 Funktioniert

    Mfg Herodennis
     
    #1
Status des Themas:
Es sind keine weiteren Antworten möglich.