Mirror von
https://github.com/IntellectualSites/FastAsyncWorldEdit.git
synchronisiert 2024-11-03 01:50:07 +01:00
Force non-Locatable actors to use placeAtPos1
Dieser Commit ist enthalten in:
Ursprung
44dc926c49
Commit
6162a47002
@ -521,6 +521,14 @@ public class LocalSession {
|
|||||||
return selector.getPrimaryPosition();
|
return selector.getPrimaryPosition();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setPlaceAtPos1(boolean placeAtPos1) {
|
||||||
|
this.placeAtPos1 = placeAtPos1;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isPlaceAtPos1() {
|
||||||
|
return placeAtPos1;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Toggle placement position.
|
* Toggle placement position.
|
||||||
*
|
*
|
||||||
|
@ -34,6 +34,7 @@ import com.sk89q.worldedit.command.tool.SelectionWand;
|
|||||||
import com.sk89q.worldedit.command.tool.Tool;
|
import com.sk89q.worldedit.command.tool.Tool;
|
||||||
import com.sk89q.worldedit.entity.Player;
|
import com.sk89q.worldedit.entity.Player;
|
||||||
import com.sk89q.worldedit.event.platform.ConfigurationLoadEvent;
|
import com.sk89q.worldedit.event.platform.ConfigurationLoadEvent;
|
||||||
|
import com.sk89q.worldedit.extension.platform.Locatable;
|
||||||
import com.sk89q.worldedit.session.request.Request;
|
import com.sk89q.worldedit.session.request.Request;
|
||||||
import com.sk89q.worldedit.session.storage.JsonFileSessionStore;
|
import com.sk89q.worldedit.session.storage.JsonFileSessionStore;
|
||||||
import com.sk89q.worldedit.session.storage.SessionStore;
|
import com.sk89q.worldedit.session.storage.SessionStore;
|
||||||
@ -199,6 +200,11 @@ public class SessionManager {
|
|||||||
&& (owner.hasPermission("worldedit.inventory.unrestricted")
|
&& (owner.hasPermission("worldedit.inventory.unrestricted")
|
||||||
|| (config.useInventoryCreativeOverride && (!(owner instanceof Player) || ((Player) owner).getGameMode() == GameModes.CREATIVE)))));
|
|| (config.useInventoryCreativeOverride && (!(owner instanceof Player) || ((Player) owner).getGameMode() == GameModes.CREATIVE)))));
|
||||||
|
|
||||||
|
// Force non-locatable actors to use placeAtPos1
|
||||||
|
if (!(owner instanceof Locatable)) {
|
||||||
|
session.setPlaceAtPos1(true);
|
||||||
|
}
|
||||||
|
|
||||||
return session;
|
return session;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren