HomeSpawnPlus

HomeSpawnPlus

342k Downloads

REQ: Add Distance-based teleportation cost

Feeriix opened this issue ยท 1 comments

commented

Instead of having a fixed cost, check distance to home or spawn and add it to cost (with a cost-per-block config option).
Can this be done?

commented

I wouldn't just want it to be a config file - it's likely people would want costs to go up or down depending on rank (permissions). If I made it a mode, you could add it to strategy chains however you like, ie:

events:
  onHomeCommand:
    - modeCostPerBlock:10
    - homeMultiWorld

The biggest challenge is that right now commands are the only thing in HSP that use economy, so this wouldn't work like you might expect if you tried to use it for the onDeath strategy, without me writing a bunch of new code to check for and apply costs on every event (and make sure to not double charge for command-based events that already apply cost). Also this wouldn't work for commands that don't use strategy chains, specifically HomeInvite teleports (/hit).

So while the feature sounds interesting, I can't think of any simple means to add this feature in a consistent fashion without having to kludge code in a bunch of places.