Author Topic: Restrict Bricks [v0.0.2]  (Read 2999 times)

Restrict Bricks

Use this mod to restrict bricks on the server to admin only.

/restrictBricks - Admin only. Use to toggle restrict bricks mode. Any bricks added to your brick inventory at this time will be made restricted to non admins.

/unRestrictBricks - Admin only. Same as above, but it unrestricts bricks.

/unRestrictAllBricks - Super admin only. Use to unrestrict all bricks on the server.

May not be compatible with Too Many Bricks Inventory.

DOWNLOAD ON BLOCKLAND GLASS
« Last Edit: August 14, 2016, 05:28:28 PM by jes00 »

Cool.

Can you please make it so an Admin can see a list of the restricted bricks?

onTrustCheckFinished is not the correct place to put this check, as it indicates the brick has been properly planted and passed all checks. You especially don't call trustCheckFailed from that.

Maybe package fxDtsBrick::plant and return 6 instead.


onTrustCheckFinished is not the correct place to put this check, as it indicates the brick has been properly planted and passed all checks. You especially don't call trustCheckFailed from that.

Maybe package fxDtsBrick::plant and return 6 instead.
Oh.  I would put it in servercmdplantbrick.  Iirc fxDtsBrick::plant is called when bricks are loaded as well as when they are planted normally?  I dunno.

Oh.  I would put it in servercmdplantbrick.  Iirc fxDtsBrick::plant is called when bricks are loaded as well as when they are planted normally?  I dunno.
when bricks are loaded fxdtsbrick::onLoadPlant is called

onTrustCheckFinished is not the correct place to put this check, as it indicates the brick has been properly planted and passed all checks. You especially don't call trustCheckFailed from that.

Maybe package fxDtsBrick::plant and return 6 instead.

You should fix this.

Updated to 0.0.1.
Now uses fxDTSBrick::plant instead.

Iirc fxDtsBrick::plant is called when bricks are loaded as well as when they are planted normally?
Yes it is. I worked around this by packaging fxDTSBrick::onLoadPlant and setting a global variable to tell fxDTSBrick::plant that the brick is being planted by loading and not by someone placing it.

No need for that, if a brick is being planted by loading, $LastLoadedBrick will be set to it before .plant() is called

No need for that, if a brick is being planted by loading, $LastLoadedBrick will be set to it before .plant() is called
Never knew that. Useful info though.

Now uses $LastLoadedBrick.