mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-07-04 03:56:41 +00:00
Added a command to turn it on/off
This commit is contained in:
@ -618,6 +618,14 @@ public class LocalSession {
|
||||
public void tellVersion(Actor player) {
|
||||
}
|
||||
|
||||
public boolean shouldUseServerCUI() {
|
||||
return this.useServerCUI;
|
||||
}
|
||||
|
||||
public void setUseServerCUI(boolean useServerCUI) {
|
||||
this.useServerCUI = useServerCUI;
|
||||
}
|
||||
|
||||
/**
|
||||
* Update server-side WorldEdit CUI.
|
||||
*
|
||||
@ -628,12 +636,16 @@ public class LocalSession {
|
||||
return; // This is for players only.
|
||||
}
|
||||
|
||||
Player player = (Player) actor;
|
||||
|
||||
if (!useServerCUI || hasCUISupport) {
|
||||
if (cuiTemporaryBlock != null) {
|
||||
player.sendFakeBlock(cuiTemporaryBlock, null);
|
||||
cuiTemporaryBlock = null;
|
||||
}
|
||||
return; // If it's not enabled, ignore this.
|
||||
}
|
||||
|
||||
Player player = (Player) actor;
|
||||
|
||||
// Remove the old block.
|
||||
if (cuiTemporaryBlock != null) {
|
||||
player.sendFakeBlock(cuiTemporaryBlock, null);
|
||||
|
Reference in New Issue
Block a user