2023.03 update 2 / 2

I think we're done!!!
This commit is contained in:
Paul Reilly
2023-03-09 03:50:47 -06:00
parent 2265783afb
commit b7ea1b8b3e
101 changed files with 534 additions and 380 deletions

View File

@ -7,7 +7,7 @@ import java.util.SplittableRandom;
import java.util.UUID;
import me.totalfreedom.totalfreedommod.FreedomService;
import me.totalfreedom.totalfreedommod.shop.ShopItem;
import me.totalfreedom.shop.ShopItem;
import me.totalfreedom.totalfreedommod.util.Groups;
import org.bukkit.Location;
import org.bukkit.Material;
@ -36,6 +36,8 @@ public class Trailer extends FreedomService
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
public void onPlayerMove(PlayerMoveEvent event)
{
if (plugin.sh == null) return; // Shop is disabled
/* Doesn't continue any further if...
* - The trail list is empty
* - The player doesn't have their trail enabled in the first place
@ -63,6 +65,7 @@ public class Trailer extends FreedomService
return;
}
// TODO: Make this particles instead of blocks!
fromBlock.setType(Groups.WOOL_COLORS.get(random.nextInt(Groups.WOOL_COLORS.size())));
BlockData data = fromBlock.getBlockData();
Material material = Material.getMaterial(String.valueOf(fromBlock.getType()));