Mirror von
https://github.com/IntellectualSites/FastAsyncWorldEdit.git
synchronisiert 2024-12-25 02:20:07 +01:00
[Forge] Better handle null platform field in ForgeWorldEdit.
Dieser Commit ist enthalten in:
Ursprung
6e739b3000
Commit
7eb487aef7
@ -106,7 +106,7 @@ public class ForgeWorldEdit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
public void serverAboutToSTart(FMLServerAboutToStartEvent event) {
|
public void serverAboutToStart(FMLServerAboutToStartEvent event) {
|
||||||
if (this.platform != null) {
|
if (this.platform != null) {
|
||||||
logger.warning("FMLServerStartingEvent occurred when FMLServerStoppingEvent hasn't");
|
logger.warning("FMLServerStartingEvent occurred when FMLServerStoppingEvent hasn't");
|
||||||
WorldEdit.getInstance().getPlatformManager().unregister(platform);
|
WorldEdit.getInstance().getPlatformManager().unregister(platform);
|
||||||
@ -144,6 +144,11 @@ public class ForgeWorldEdit {
|
|||||||
|
|
||||||
@ForgeSubscribe
|
@ForgeSubscribe
|
||||||
public void onPlayerInteract(PlayerInteractEvent event) {
|
public void onPlayerInteract(PlayerInteractEvent event) {
|
||||||
|
if (platform == null) {
|
||||||
|
logger.warning("WorldEdit didn't initialize correctly! Please report this error.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (!platform.isHookingEvents()) return; // We have to be told to catch these events
|
if (!platform.isHookingEvents()) return; // We have to be told to catch these events
|
||||||
|
|
||||||
if (event.useItem == Result.DENY || event.entity.worldObj.isRemote) return;
|
if (event.useItem == Result.DENY || event.entity.worldObj.isRemote) return;
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren