mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2024-12-22 17:27:38 +00:00
Force non-Locatable actors to use placeAtPos1
This commit is contained in:
parent
44dc926c49
commit
6162a47002
@ -521,6 +521,14 @@ public class LocalSession {
|
||||
return selector.getPrimaryPosition();
|
||||
}
|
||||
|
||||
public void setPlaceAtPos1(boolean placeAtPos1) {
|
||||
this.placeAtPos1 = placeAtPos1;
|
||||
}
|
||||
|
||||
public boolean isPlaceAtPos1() {
|
||||
return placeAtPos1;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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.entity.Player;
|
||||
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.storage.JsonFileSessionStore;
|
||||
import com.sk89q.worldedit.session.storage.SessionStore;
|
||||
@ -199,6 +200,11 @@ public class SessionManager {
|
||||
&& (owner.hasPermission("worldedit.inventory.unrestricted")
|
||||
|| (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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user