mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-05 02:22:12 +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.io.File;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import org.bukkit.craftbukkit.CraftWorld;
|
import org.bukkit.craftbukkit.CraftWorld;
|
||||||
|
import org.bukkit.event.Event;
|
||||||
|
|
||||||
|
|
||||||
public class WorldServer extends World {
|
public class WorldServer extends World {
|
||||||
|
@ -41,6 +42,10 @@ public class WorldServer extends World {
|
||||||
public CraftWorld getWorld() {
|
public CraftWorld getWorld() {
|
||||||
return world;
|
return world;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void callHook(Event event) {
|
||||||
|
D.server.getPluginManager().callEvent(event);
|
||||||
|
}
|
||||||
// CraftBukkit stop
|
// CraftBukkit stop
|
||||||
|
|
||||||
public void f() {
|
public void f() {
|
||||||
|
|
Loading…
Reference in a new issue