mirror of
https://github.com/danbulant/flying-squid
synced 2026-06-14 12:01:12 +00:00
limit /portal command to 21x21
This commit is contained in:
parent
b39072ebb2
commit
b5328463a4
1 changed files with 2 additions and 0 deletions
|
|
@ -64,6 +64,8 @@ module.exports.player=function(player,serv) {
|
|||
return {bottomLeft,direction,width,height};
|
||||
},
|
||||
async action({bottomLeft,direction,width,height}) {
|
||||
if(width>21 || height>21)
|
||||
throw new UserError("Portals can only be 21x21!");
|
||||
const portal=generatePortal(bottomLeft,direction,width,height);
|
||||
await addPortalToWorld(player.world,portal,[],[],async (pos,type) => {
|
||||
await serv.setBlock(player.world,pos,type,0);
|
||||
|
|
|
|||
Loading…
Reference in a new issue