mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-02 17:32:03 +01:00
Added callHook method to WorldServer so we can get callEvents from
any world instance
This commit is contained in:
parent
a9191c24b3
commit
4d05943bab
1 changed files with 5 additions and 0 deletions
|
@ -4,6 +4,7 @@ package net.minecraft.server;
|
|||
import java.io.File;
|
||||
import java.util.*;
|
||||
import org.bukkit.craftbukkit.CraftWorld;
|
||||
import org.bukkit.event.Event;
|
||||
|
||||
|
||||
public class WorldServer extends World {
|
||||
|
@ -41,6 +42,10 @@ public class WorldServer extends World {
|
|||
public CraftWorld getWorld() {
|
||||
return world;
|
||||
}
|
||||
|
||||
public void callHook(Event event) {
|
||||
D.server.getPluginManager().callEvent(event);
|
||||
}
|
||||
// CraftBukkit stop
|
||||
|
||||
public void f() {
|
||||
|
|
Loading…
Reference in a new issue