mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-06-11 20:13:55 +00:00
Compiles in 1.14 (yay)
This commit is contained in:
@ -9,7 +9,6 @@ import com.boydti.fawe.regions.general.plot.PlotSquaredFeature;
|
||||
import com.boydti.fawe.util.*;
|
||||
import com.boydti.fawe.util.chat.ChatManager;
|
||||
import com.boydti.fawe.util.chat.PlainChatManager;
|
||||
import com.boydti.fawe.util.cui.CUI;
|
||||
import com.sk89q.worldedit.WorldEdit;
|
||||
import com.sk89q.worldedit.extension.factory.DefaultTransformParser;
|
||||
import com.sk89q.worldedit.extension.platform.Actor;
|
||||
@ -199,25 +198,6 @@ public class Fawe {
|
||||
public void onDisable() {
|
||||
}
|
||||
|
||||
public CUI getCUI(Actor actor) {
|
||||
FawePlayer<Object> fp = FawePlayer.wrap(actor);
|
||||
CUI cui = fp.getMeta("CUI");
|
||||
if (cui == null) {
|
||||
cui = Fawe.imp().getCUI(fp);
|
||||
if (cui != null) {
|
||||
synchronized (fp) {
|
||||
CUI tmp = fp.getMeta("CUI");
|
||||
if (tmp == null) {
|
||||
fp.setMeta("CUI", cui);
|
||||
} else {
|
||||
cui = tmp;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return cui;
|
||||
}
|
||||
|
||||
public ChatManager getChatManager() {
|
||||
return chatManager;
|
||||
}
|
||||
|
@ -5,7 +5,6 @@ import com.boydti.fawe.object.FawePlayer;
|
||||
import com.boydti.fawe.object.FaweQueue;
|
||||
import com.boydti.fawe.regions.FaweMaskManager;
|
||||
import com.boydti.fawe.util.TaskManager;
|
||||
import com.boydti.fawe.util.cui.CUI;
|
||||
import com.boydti.fawe.util.image.ImageViewer;
|
||||
import com.sk89q.worldedit.world.World;
|
||||
|
||||
@ -36,8 +35,6 @@ public interface IFawe {
|
||||
|
||||
void startMetrics();
|
||||
|
||||
default CUI getCUI(FawePlayer player) { return null; }
|
||||
|
||||
default ImageViewer getImageViewer(FawePlayer player) { return null; }
|
||||
|
||||
default void registerPacketListener() {}
|
||||
|
@ -1,18 +0,0 @@
|
||||
package com.boydti.fawe.util.cui;
|
||||
|
||||
import com.boydti.fawe.object.FawePlayer;
|
||||
import com.sk89q.worldedit.internal.cui.CUIEvent;
|
||||
|
||||
public abstract class CUI {
|
||||
private final FawePlayer player;
|
||||
|
||||
public CUI(FawePlayer player) {
|
||||
this.player = player;
|
||||
}
|
||||
|
||||
public <T> FawePlayer<T> getPlayer() {
|
||||
return player;
|
||||
}
|
||||
|
||||
public abstract void dispatchCUIEvent(CUIEvent event);
|
||||
}
|
@ -2,7 +2,6 @@ package com.sk89q.jnbt;
|
||||
|
||||
import java.io.DataInputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
|
@ -33,7 +33,6 @@ import com.boydti.fawe.object.clipboard.MultiClipboardHolder;
|
||||
import com.boydti.fawe.object.collection.SparseBitSet;
|
||||
import com.boydti.fawe.object.extent.ResettableExtent;
|
||||
import com.boydti.fawe.util.*;
|
||||
import com.boydti.fawe.util.cui.CUI;
|
||||
import com.boydti.fawe.wrappers.WorldWrapper;
|
||||
import com.sk89q.jchronic.Chronic;
|
||||
import com.sk89q.jchronic.Options;
|
||||
@ -1209,9 +1208,8 @@ public class LocalSession implements TextureHolder {
|
||||
|
||||
if (hasCUISupport) {
|
||||
actor.dispatchCUIEvent(event);
|
||||
} else if (actor.isPlayer()) {
|
||||
CUI cui = Fawe.get().getCUI(actor);
|
||||
if (cui != null) cui.dispatchCUIEvent(event);
|
||||
} else if (useServerCUI) {
|
||||
updateServerCUI(actor);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user