mirror of
https://github.com/Oth3r/Sit.git
synced 2025-09-20 00:13:21 +02:00
more comments
This commit is contained in:
parent
05ed35e0ef
commit
691eacb82e
1 changed files with 6 additions and 6 deletions
|
@ -59,12 +59,12 @@ public class SitCommand {
|
|||
pos = pos.add(0,-1,0);
|
||||
}
|
||||
World world = player.getWorld();
|
||||
if (Events.checkBlocks(pos,world)) {
|
||||
if (Events.entities.containsKey(player)) {
|
||||
return 1;
|
||||
}
|
||||
DisplayEntity.TextDisplayEntity entity = new DisplayEntity.TextDisplayEntity(EntityType.TEXT_DISPLAY,player.getServerWorld());
|
||||
Events.setEntity(pos,world,entity);
|
||||
// if already sitting, ignore
|
||||
if (Events.entities.containsKey(player)) return 1;
|
||||
// make entity first to check the blocks
|
||||
DisplayEntity.TextDisplayEntity entity = new DisplayEntity.TextDisplayEntity(EntityType.TEXT_DISPLAY,player.getServerWorld());
|
||||
Events.setEntity(pos,world,entity);
|
||||
if (Events.checkBlocks(pos,world,Events.isAboveBlockheight(entity))) {
|
||||
player.getServerWorld().spawnEntity(entity);
|
||||
player.startRiding(entity);
|
||||
Events.entities.put(player,entity);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue