3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-12-20 21:40:06 +01:00

Fix some wrong event creations after previous change

Dieser Commit ist enthalten in:
Erik Broes 2011-03-26 23:20:35 +01:00
Ursprung 8dc7b55749
Commit 84054ec680
2 geänderte Dateien mit 6 neuen und 7 gelöschten Zeilen

Datei anzeigen

@ -21,9 +21,8 @@ import org.bukkit.craftbukkit.CraftServer;
import org.bukkit.craftbukkit.LoggerOutputStream; import org.bukkit.craftbukkit.LoggerOutputStream;
import org.bukkit.craftbukkit.command.ColouredConsoleSender; import org.bukkit.craftbukkit.command.ColouredConsoleSender;
import org.bukkit.craftbukkit.scheduler.CraftScheduler; import org.bukkit.craftbukkit.scheduler.CraftScheduler;
import org.bukkit.event.Event; import org.bukkit.event.world.WorldSaveEvent;
import org.bukkit.event.world.WorldEvent;
// CraftBukkit end
public class MinecraftServer implements Runnable, ICommandListener { public class MinecraftServer implements Runnable, ICommandListener {
@ -211,7 +210,7 @@ public class MinecraftServer implements Runnable, ICommandListener {
world.a(true, (IProgressUpdate) null); world.a(true, (IProgressUpdate) null);
world.r(); world.r();
WorldEvent event = new WorldEvent( Event.Type.WORLD_SAVE, world.getWorld() ); WorldSaveEvent event = new WorldSaveEvent( world.getWorld() );
server.getPluginManager().callEvent( event ); server.getPluginManager().callEvent( event );
} }

Datei anzeigen

@ -2,6 +2,8 @@ package org.bukkit.craftbukkit;
import org.bukkit.command.*; import org.bukkit.command.*;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
import org.bukkit.event.world.WorldLoadEvent;
import java.io.File; import java.io.File;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.LinkedHashMap; import java.util.LinkedHashMap;
@ -30,8 +32,6 @@ import org.bukkit.plugin.SimplePluginManager;
import org.bukkit.plugin.java.JavaPluginLoader; import org.bukkit.plugin.java.JavaPluginLoader;
import org.bukkit.scheduler.BukkitScheduler; import org.bukkit.scheduler.BukkitScheduler;
import org.bukkit.craftbukkit.scheduler.CraftScheduler; import org.bukkit.craftbukkit.scheduler.CraftScheduler;
import org.bukkit.event.Event.Type;
import org.bukkit.event.world.WorldEvent;
public final class CraftServer implements Server { public final class CraftServer implements Server {
private final String serverName = "Craftbukkit"; private final String serverName = "Craftbukkit";
@ -334,7 +334,7 @@ public final class CraftServer implements Server {
protected void addWorld(World world) { protected void addWorld(World world) {
worlds.put(world.getName().toLowerCase(), world); worlds.put(world.getName().toLowerCase(), world);
pluginManager.callEvent(new WorldEvent(Type.WORLD_LOAD, world)); pluginManager.callEvent(new WorldLoadEvent(world));
} }
public Logger getLogger() { public Logger getLogger() {