Develop a complete, production-ready Minecraft plugin called SkyCarHeist for Paper/Spigot 1.12.2, using Java 8, MTVehicles 2.5.3, Citizens, and Vault.
This is for a real-life economy roleplay server. The plugin must be fully functional, configurable, and compatible with the specified versions. Research the actual APIs before implementing anything. Do not invent methods or use modern Minecraft API features unavailable in 1.12.2.
Vehicle and spawning
A sports car spawns automatically every 30 minutes at an administrator-configurable location.
The vehicle model is Sportief Bordeauxclean, using MTVehicles 2.5.3.
Correctly identify the difference between the vehicle's model name and any registered vehicle identifier or license plate required by MTVehicles.
Only one CarHeist vehicle may be active at a time.
Players must steal and drive the actual mission vehicle to complete the heist.
Properly remove the vehicle after success, failure, cancellation, timeout, or server shutdown.
Make the spawn interval, location, vehicle identifier, and cleanup behavior configurable.
Theft and police
Detect when a player steals or starts driving the mission vehicle.
Once the theft begins, notify all online players with the configurable permission carheist.police.
Include the suspect's name and the vehicle's last known coordinates where possible.
Avoid duplicate or spam notifications.
Handle driver changes, disconnects, and abandoned vehicles safely.
Citizens delivery system
Use existing Citizens NPCs as delivery targets.
Allow administrators to register multiple NPC IDs.
Randomly select a registered NPC and an administrator-defined delivery location for each heist.
Move the selected NPC to the selected location using a version-compatible Citizens API where possible.
The player must deliver the actual mission vehicle within a configurable radius of the correct destination.
Display the destination to the driver and prevent players from claiming rewards simply by walking to the NPC.
Ensure each mission can only be completed once.
Timer and HUD
The default delivery time limit is five minutes, starting when the vehicle is stolen.
Display the remaining time and delivery destination on the player's screen.
Update the timer continuously and fail the mission when time runs out.
Make the timer duration and HUD settings configurable.
Prefer a readable action bar or BossBar compatible with Minecraft 1.12.2.
Vehicle damage and on-screen condition — essential
Players must be able to see the car's current condition directly on their screen while driving the mission vehicle.
Example display:
CAR CONDITION: 85% [||||||||--]
DELIVERY: City Garage | TIME: 04:32
ESTIMATED REWARD: $8,500
Start the vehicle at 100% condition.
Detect collisions and vehicle damage using verified MTVehicles 2.5.3 events or other reliable, version-compatible methods.
Reduce the vehicle's condition when it collides with objects or takes damage.
Update the condition HUD immediately when damage occurs.
Display a configurable warning when the vehicle becomes badly damaged.
Allow configuration of collision damage, damage cooldowns, detection intervals, warning thresholds, and whether the HUD is shown to the driver, passengers, or nearby players.
Prevent a single collision from being counted repeatedly every tick.
Avoid treating normal stops or ordinary driving as collisions.
Maintain an internal condition percentage if MTVehicles does not provide native vehicle health.
Make the HUD reflect the actual internally tracked condition, not a hardcoded value.
Investigate the actual MTVehicles 2.5.3 API. If it does not expose reliable collision detection, implement the best available alternative and explicitly document its limitations. Do not pretend heuristic collision detection is perfectly reliable.
Vault economy and rewards
Integrate with Vault and the server's economy provider.
Default base reward: $10,000.
Calculate the final payout according to the car's remaining condition: an undamaged car earns the full reward, while a damaged car earns less.
For example, 50% condition should normally result in approximately 50% of the base reward.
Allow administrators to configure the base reward, minimum reward, reward formula, and optional penalties.
Show the estimated reward on the HUD if enabled, and tell the player the final payout after successful delivery.
Never pay twice, and never pay for a failed or cancelled mission.
Configuration and administration
Make all reasonable gameplay settings configurable, including:
Spawn interval, mission duration, vehicle identifier, and spawn coordinates.
Damage system, collision penalties, condition thresholds, and HUD appearance.
Reward formula and economy amounts.
Police permission and notification messages.
Citizens NPC IDs, delivery locations, and delivery radius.
Mission messages, debug logging, and cleanup behavior.
Provide administrator commands for starting and stopping a heist, reloading configuration, setting the spawn location, adding and removing delivery NPCs, adding and removing delivery locations, listing the configuration, and viewing the current mission status. Include permissions and tab completion where appropriate.
Validate configuration values and provide clear error messages for missing dependencies, invalid NPCs, failed vehicle spawning, and unavailable economy providers.
Reliability and deliverables
Handle missing plugins, deleted NPCs, invalid locations, vehicle removal by other plugins, player disconnects, server restarts, timeouts, and simultaneous reward claims safely.
Deliver a complete Maven project and, if compilation is available, a ready-to-install JAR as well as the source ZIP. Include clear installation instructions and document any required MTVehicles vehicle registration.
Before declaring the plugin complete:
Compile against the correct Minecraft 1.12.2 API with Java 8 compatibility.
Verify MTVehicles 2.5.3 vehicle spawning and cleanup.
Verify Citizens delivery integration and Vault payouts.
Test the complete heist lifecycle, collision damage, HUD updates, rewards, and cleanup.
Fix compilation errors and report honestly which tests were actually run.
Do not return a skeleton, pseudocode, or untested claims of compatibility. If any feature cannot be implemented reliably with these versions, explain the limitation and provide the best working alternative. ``
Verify the MTVehicles 2.5.3, Citizens, and Vault APIs and their 1.12.2 constraints.
Build the Maven plugin, configuration, commands, mission lifecycle, HUD, damage tracking, and integrations.
Check compile/test availability and clearly identify any integration limits or unverified behavior.
I can’t honestly deliver this as production-ready yet: I couldn’t verify the MTVehicles 2.5.3 API needed to spawn, identify, track, and remove the mission vehicle. Its documentation lookup returned no registered reference, and the plugin resource page was inaccessible. Guessing its methods or vehicle identifier would risk producing a plugin that doesn’t work on your server.
Please provide the MTVehicles 2.5.3 JAR or its API documentation, plus the vehicle’s registration entry for Sportief Bordeauxclean. The registration entry is important because the model name may differ from the identifier MTVehicles expects. With those, I can build the complete project against verified vehicle APIs and clearly report what could be compiled and tested.
https://docs.mtvehicles.eu/
Use MTVehicles’ documented vehicle-template UUID separately from the generated license plate; call its vehicle API reflectively so the project compiles without an MTVehicles compile-time artifact.
Create the Java 8/Minecraft 1.12.2 Maven plugin with mission lifecycle, Citizens navigation, Vault payouts, commands, configuration, HUD, and damage tracking.
Document the damage-detection limitation and installation/registration steps; report compilation and testing status accurately.
Created the SkyCarHeist Maven source project with mission management, configurable commands and locations, Citizens navigation, Vault payouts, an action-bar HUD, condition tracking, and vehicle cleanup.
The MTVehicles identifiers are treated separately: vehicle.template-uuid selects the registered vehicle definition, vehicle.model-name checks the expected name (Sportief Bordeauxclean), and MTVehicles supplies the mission vehicle’s runtime license plate. The integration uses documented MTVehicles API calls reflectively; cleanup uses despawn plus Vehicle.delete() rather than deleteVehicle, which the documentation marks as introduced in 2.5.4.
This is not verified as production-ready: the documentation site identifies itself as MTVehicles 2.5.8, and I did not have the exact 2.5.3 JAR to check against. Damage tracking listens for MTVehicles’ VehicleDamageEvent, but the API documentation does not establish that it distinguishes collisions from other damage or reports every collision. No compilation or server tests were run, including the lifecycle, Citizens navigation, or Vault payout tests. No ready JAR or source ZIP was generated.
To build and download the JAR in Kodari: click Compile in the top bar, click Compile in the window, then click Download after it succeeds.
I don't think it has the vehicledamageevent, can you not create it?
Not inside MTVehicles: that plugin must define and fire its own VehicleDamageEvent; creating a same-named class in SkyCarHeist wouldn’t make MTVehicles emit it.
I removed SkyCarHeist’s dependency on that event and added polling of MTVehicles’ documented Vehicle.getHealth() value. A detected decrease now lowers mission condition, subject to the configured cooldown. This only detects damage MTVehicles reflects in stored health; whether 2.5.3 updates that value for collisions still needs a runtime test.
Can you not create an event that detects collisions? i don't think the get health will work.
I replaced health polling with a reflective listener for MTVehicles’ documented VehicleDamageEvent; when that event fires for the mission car, its condition decreases. If your MTVehicles version lacks the event, SkyCarHeist will still load, but damage tracking won’t be available.
A custom event in SkyCarHeist can relay a collision signal, but it can’t detect collisions on its own. Whether MTVehicles 2.5.3 fires its damage event for vehicle collisions still needs testing on your server; I haven’t verified that behavior.
[20:52:32 INFO]: Yxda issued server command: /skycarheist start [20:52:32 ERROR]: [SkyCarHeist] Set vehicle.template-uuid to the registered MTVehicles template UUID before starting a heist.
That message means SkyCarHeist is still using the default placeholder. Edit the server’s plugins/SkyCarHeist/config.yml and replace:
template-uuid: "REPLACE_WITH_MTVEHICLES_TEMPLATE_UUID"
with the UUID of the registered vehicle template in MTVehicles’ vehicles.yml—not Sportief Bordeauxclean and not the mission car’s license plate. Then run /skycarheist reload followed by /skycarheist start. If you paste the relevant vehicle entry from vehicles.yml, I can help identify which value to use.
it does not spawn [20:55:56 INFO]: Yxda issued server command: /skycarheist start [20:55:56 INFO]: [SkyCarHeist] A mission car is ready. Steal it and deliver it to Danny'sautopaleis! [20:55:56 INFO]: [Level 15] [Burgm. Hax] Zoefje: nee [20:55:56 WARN]: [SkyCarHeist] The waiting mission vehicle disappeared and was cleaned up.
Ensure MTVehicles’ spawn chunk is loaded before spawning.
Give MTVehicles a short registration grace period; announce success only after its API reports the vehicle in-world.
The log comes from SkyCarHeist finding no location for the vehicle plate through MTVehicles’ API, then cleaning it up on the first check. I updated the spawn flow to load the target chunk, allow up to five seconds for MTVehicles to register the spawned vehicle, and only announce the car as ready once MTVehicles reports its location.
If it still doesn’t appear, share the new console output—especially whether it logs “MTVehicles did not report mission vehicle … as spawned within 5 seconds.” No server test was run here.
Maybe make everything logable in the plugin to find bugs quicklier, also a player needs to be start the 'heist' by clicking on the car. The car already needs to be there with maybe a holographic display above it when its able to steal and if not how long it takes before they can.
Add configurable diagnostic logging for heist and vehicle lifecycle.
Change the heist to start when a player clicks the waiting car.
Show an above-car status display for stealable/respawn timing.
Updated SkyCarHeist to spawn a mission car automatically on startup and again after the configured cooldown. When it’s waiting, players click the MTVehicles car to start the heist.
The hologram says click to start while the car is available, shows remaining mission time once started, and shows the next-spawn countdown at the configured spawn point during cooldown.
Diagnostic logging now covers the main heist lifecycle and MTVehicles/Citizens integration. Set debug: true in the server’s plugins/SkyCarHeist/config.yml, then run /skycarheist reload to enable it.
Do i need to compile it again?
Yes. Compile the project again in Kodari to include the latest changes, then download the new JAR and replace the old SkyCarHeist JAR on your server. Restart the server after replacing it.
📄
pasted-code-1792438562817.txt
txt
38 lines
▶
[21:35:04 INFO]: Liquidatie issued server command: /skycarheist start
[21:35:04 INFO]: [SkyCarHeist] [debug] Creating mission vehicle at Haxdale -462,54,139 using template D2VPX5; destination=DannysAutopaleis, NPC=34.
[21:35:04 INFO]: [SkyCarHeist] [debug] Requesting MTVehicles item for template D2VPX5.
[21:35:04 INFO]: [SkyCarHeist] [debug] Spawning MTVehicles plate MZ-GV-DG at Haxdale -462,54,139.
[21:35:04 INFO]: [SkyCarHeist] [debug] MTVehicles spawn call completed for plate MZ-GV-DG.
[21:35:04 INFO]: [SkyCarHeist] [debug] Citizens could not navigate NPC 34: null
[21:35:04 INFO]: [SkyCarHeist] [debug] Citizens navigation was unavailable for NPC 34; mission destination remains valid.
[21:35:04 INFO]: [SkyCarHeist] [debug] Spawned mission template D2VPX5 as runtime plate MZ-GV-DG.
[21:35:06 INFO]: [SkyCarHeist] [debug] Received MTVehicles event nl.mtvehicles.core.events.VehicleEnterEvent for plate MZ-GV-DG from player Liquidatie.
[21:35:06 INFO]: [SkyCarHeist] [debug] Mission vehicle enter event: plate=MZ-GV-DG, player=Liquidatie.
[21:35:06 INFO]: [SkyCarHeist] [debug] Received MTVehicles event nl.mtvehicles.core.events.VehicleLeaveEvent for plate MZ-GV-DG from player Liquidatie.
[21:35:06 INFO]: [SkyCarHeist] [debug] Mission vehicle leave event: plate=MZ-GV-DG, player=Liquidatie.
[21:35:06 INFO]: [SkyCarHeist] [debug] Received MTVehicles event nl.mtvehicles.core.events.VehiclePickUpEvent for plate MZ-GV-DG from player Liquidatie.
[21:35:06 INFO]: [SkyCarHeist] [debug] Blocked pickup attempt for active mission vehicle MZ-GV-DG.
[21:35:07 INFO]: [SkyCarHeist] [debug] Received MTVehicles event nl.mtvehicles.core.events.VehicleEnterEvent for plate MZ-GV-DG from player Liquidatie.
[21:35:07 INFO]: [SkyCarHeist] [debug] Mission vehicle enter event: plate=MZ-GV-DG, player=Liquidatie.
[21:35:07 INFO]: [SkyCarHeist] [debug] Received MTVehicles event nl.mtvehicles.core.events.VehicleLeaveEvent for plate MZ-GV-DG from player Liquidatie.
[21:35:07 INFO]: [SkyCarHeist] [debug] Mission vehicle leave event: plate=MZ-GV-DG, player=Liquidatie.
[21:35:07 INFO]: [SkyCarHeist] [debug] Received MTVehicles event nl.mtvehicles.core.events.VehiclePickUpEvent for plate MZ-GV-DG from player Liquidatie.
[21:35:07 INFO]: [SkyCarHeist] [debug] Blocked pickup attempt for active mission vehicle MZ-GV-DG.
[21:35:10 INFO]: [SkyCarHeist] [debug] Received MTVehicles event nl.mtvehicles.core.events.VehicleEnterEvent for plate MZ-GV-DG from player Liquidatie.
[21:35:10 INFO]: [SkyCarHeist] [debug] Mission vehicle enter event: plate=MZ-GV-DG, player=Liquidatie.
[21:35:10 INFO]: [SkyCarHeist] [debug] Received MTVehicles event nl.mtvehicles.core.events.VehicleLeaveEvent for plate MZ-GV-DG from player Liquidatie.
[21:35:10 INFO]: [SkyCarHeist] [debug] Mission vehicle leave event: plate=MZ-GV-DG, player=Liquidatie.
[21:35:10 INFO]: [SkyCarHeist] [debug] Received MTVehicles event nl.mtvehicles.core.events.VehiclePickUpEvent for plate MZ-GV-DG from player Liquidatie.
[21:35:10 INFO]: [SkyCarHeist] [debug] Blocked pickup attempt for active mission vehicle MZ-GV-DG.
[21:35:10 INFO]: [SkyCarHeist] [debug] Cleaning up mission vehicle MZ-GV-DG.
[21:35:10 INFO]: [SkyCarHeist] [debug] Requesting MTVehicles cleanup for plate MZ-GV-DG.
[21:35:10 INFO]: [SkyCarHeist] [debug] Next automatic mission spawn is scheduled in 30 minute(s).
[21:35:10 WARN]: [SkyCarHeist] MTVehicles did not report mission vehicle MZ-GV-DG as spawned within 5 seconds; it was cleaned up.
[21:35:14 INFO]: [SkyCarHeist] [debug] Received MTVehicles event nl.mtvehicles.core.events.VehicleEnterEvent for plate QP-ZM-AQ.
[21:35:14 INFO]: [SkyCarHeist] [debug] Received MTVehicles event nl.mtvehicles.core.events.VehicleLeaveEvent for plate QP-ZM-AQ.
[21:35:14 INFO]: [SkyCarHeist] [debug] Received MTVehicles event nl.mtvehicles.core.events.VehiclePickUpEvent for plate QP-ZM-AQ.
[21:35:14 INFO]: [SkyCarHeist] [debug] Received MTVehicles event nl.mtvehicles.core.events.VehicleDamageEvent for plate QP-ZM-AQ.
[21:35:14 INFO]: [SkyCarHeist] [debug] Received MTVehicles event nl.mtvehicles.core.events.VehicleEnterEvent for plate QP-ZM-AQ.
[21:35:14 INFO]: [SkyCarHeist] [debug] Received MTVehicles event nl.mtvehicles.core.events.VehicleLeaveEvent for plate QP-ZM-AQ.
[21:35:14 INFO]: [SkyCarHeist] [debug] Received MTVehicles event nl.mtvehicles.core.events.VehiclePickUpEvent for plate QP-ZM-AQ.
[21:35:14 INFO]: [SkyCarHeist] [debug] Received MTVehicles event nl.mtvehicles.core.events.VehicleDamageEvent for plate QP-ZM-AQ.
The log confirms MTVehicles emitted enter, leave, and pickup events for mission plate MZ-GV-DG, so the vehicle was present. SkyCarHeist then removed it because getLocation() stayed null. I’ll use MTVehicles’ spawned-plate list and observed events as presence checks, and fall back to the driver’s position when its location API returns null.
The logs show MTVehicles did spawn MZ-GV-DG: it fired enter, leave, and pickup events for that plate. SkyCarHeist removed it because MTVehicles’ getLocation() kept returning null. The pickup attempts were also being blocked intentionally; the player should steal the car by entering and driving it.
I changed SkyCarHeist to check MTVehicles’ spawned-vehicle list and observed events before deciding the car is missing. It can also use the driver’s location as a fallback, and entering the mission car now starts the heist if the click interaction isn’t detected. The QP-ZM-AQ damage events are for a different vehicle, not the mission car.
Compile and install the updated plugin JAR, then restart the server to test these changes.
📄
pasted-code-1792439230359.txt
txt
55 lines
▶
[21:45:40 INFO]: Liquidatie issued server command: /skycarheist reload
[21:45:40 INFO]: [SkyCarHeist] [debug] Reloading heist settings.
[21:45:40 INFO]: [SkyCarHeist] [debug] Next automatic mission spawn is scheduled in 30 minute(s).
[21:45:40 INFO]: [SkyCarHeist] [debug] Scheduled automatic heist checks every second.
[21:45:48 INFO]: Liquidatie issued server command: /skycarheist start
[21:45:48 INFO]: [SkyCarHeist] [debug] Creating mission vehicle at Haxdale -463,54,139 using template D2VPX5; destination=DannysAutopaleis, NPC=34.
[21:45:48 INFO]: [SkyCarHeist] [debug] Requesting MTVehicles item for template D2VPX5.
[21:45:48 INFO]: [SkyCarHeist] [debug] Spawning MTVehicles plate RX-LO-KT at Haxdale -463,54,139.
[21:45:48 INFO]: [SkyCarHeist] [debug] MTVehicles spawn call completed for plate RX-LO-KT.
[21:45:48 INFO]: [SkyCarHeist] [debug] Citizens could not navigate NPC 34: null
[21:45:48 INFO]: [SkyCarHeist] [debug] Citizens navigation was unavailable for NPC 34; mission destination remains valid.
[21:45:48 INFO]: [SkyCarHeist] [debug] Spawned mission template D2VPX5 as runtime plate RX-LO-KT.
[21:45:49 INFO]: [SkyCarHeist] [debug] Mission vehicle RX-LO-KT is present at Haxdale -463,54,139.
[21:45:49 INFO]: [SkyCarHeist] A mission car is ready. Steal it and deliver it to DannysAutopaleis!
[21:45:54 INFO]: [SkyCarHeist] [debug] Received MTVehicles event nl.mtvehicles.core.events.VehicleEnterEvent for plate RX-LO-KT from player Liquidatie.
[21:45:54 INFO]: [SkyCarHeist] [debug] Mission vehicle enter event: plate=RX-LO-KT, player=Liquidatie.
[21:45:54 INFO]: [SkyCarHeist] [debug] Heist started by clicking the mission vehicle: player=Liquidatie, plate=RX-LO-KT, destination=DannysAutopaleis, duration=300s.
[21:45:54 INFO]: [SkyCarHeist] [debug] Received MTVehicles event nl.mtvehicles.core.events.VehicleLeaveEvent for plate RX-LO-KT from player Liquidatie.
[21:45:54 INFO]: [SkyCarHeist] [debug] Mission vehicle leave event: plate=RX-LO-KT, player=Liquidatie.
[21:45:54 INFO]: [SkyCarHeist] [debug] Received MTVehicles event nl.mtvehicles.core.events.VehiclePickUpEvent for plate RX-LO-KT from player Liquidatie.
[21:45:54 INFO]: [SkyCarHeist] [debug] Blocked pickup attempt for active mission vehicle RX-LO-KT.
[21:45:59 INFO]: [SkyCarHeist] [debug] Received MTVehicles event nl.mtvehicles.core.events.VehicleEnterEvent for plate RX-LO-KT from player Liquidatie.
[21:45:59 INFO]: [SkyCarHeist] [debug] Mission vehicle enter event: plate=RX-LO-KT, player=Liquidatie.
[21:45:59 INFO]: [SkyCarHeist] [debug] Player Liquidatie clicked mission vehicle RX-LO-KT after its heist had already started.
[21:45:59 INFO]: [SkyCarHeist] [debug] Received MTVehicles event nl.mtvehicles.core.events.VehicleLeaveEvent for plate RX-LO-KT from player Liquidatie.
[21:45:59 INFO]: [SkyCarHeist] [debug] Mission vehicle leave event: plate=RX-LO-KT, player=Liquidatie.
[21:45:59 INFO]: [SkyCarHeist] [debug] Received MTVehicles event nl.mtvehicles.core.events.VehiclePickUpEvent for plate RX-LO-KT from player Liquidatie.
[21:45:59 INFO]: [SkyCarHeist] [debug] Blocked pickup attempt for active mission vehicle RX-LO-KT.
[21:46:01 INFO]: [SkyCarHeist] [debug] Received MTVehicles event nl.mtvehicles.core.events.VehicleEnterEvent for plate RX-LO-KT from player Liquidatie.
[21:46:01 INFO]: [SkyCarHeist] [debug] Mission vehicle enter event: plate=RX-LO-KT, player=Liquidatie.
[21:46:01 INFO]: [SkyCarHeist] [debug] Player Liquidatie clicked mission vehicle RX-LO-KT after its heist had already started.
[21:46:01 INFO]: [SkyCarHeist] [debug] Received MTVehicles event nl.mtvehicles.core.events.VehicleLeaveEvent for plate RX-LO-KT from player Liquidatie.
[21:46:01 INFO]: [SkyCarHeist] [debug] Mission vehicle leave event: plate=RX-LO-KT, player=Liquidatie.
[21:46:01 INFO]: [SkyCarHeist] [debug] Received MTVehicles event nl.mtvehicles.core.events.VehiclePickUpEvent for plate RX-LO-KT from player Liquidatie.
[21:46:01 INFO]: [SkyCarHeist] [debug] Blocked pickup attempt for active mission vehicle RX-LO-KT.
[21:46:01 INFO]: [SkyCarHeist] [debug] Received MTVehicles event nl.mtvehicles.core.events.VehicleEnterEvent for plate RX-LO-KT from player Liquidatie.
[21:46:01 INFO]: [SkyCarHeist] [debug] Mission vehicle enter event: plate=RX-LO-KT, player=Liquidatie.
[21:46:01 INFO]: [SkyCarHeist] [debug] Player Liquidatie clicked mission vehicle RX-LO-KT after its heist had already started.
[21:46:01 INFO]: [SkyCarHeist] [debug] Received MTVehicles event nl.mtvehicles.core.events.VehicleLeaveEvent for plate RX-LO-KT from player Liquidatie.
[21:46:01 INFO]: [SkyCarHeist] [debug] Mission vehicle leave event: plate=RX-LO-KT, player=Liquidatie.
[21:46:01 INFO]: [SkyCarHeist] [debug] Received MTVehicles event nl.mtvehicles.core.events.VehiclePickUpEvent for plate RX-LO-KT from player Liquidatie.
[21:46:01 INFO]: [SkyCarHeist] [debug] Blocked pickup attempt for active mission vehicle RX-LO-KT.
[21:46:05 INFO]: [SkyCarHeist] [debug] Received MTVehicles event nl.mtvehicles.core.events.VehicleEnterEvent for plate QP-ZM-AQ.
[21:46:05 INFO]: [SkyCarHeist] [debug] Received MTVehicles event nl.mtvehicles.core.events.VehicleLeaveEvent for plate QP-ZM-AQ.
[21:46:05 INFO]: [SkyCarHeist] [debug] Received MTVehicles event nl.mtvehicles.core.events.VehiclePickUpEvent for plate QP-ZM-AQ.
[21:46:05 INFO]: [SkyCarHeist] [debug] Received MTVehicles event nl.mtvehicles.core.events.VehicleDamageEvent for plate QP-ZM-AQ.
[21:46:13 INFO]: [Essentials] Created a User for Danny026 (2dc7103d-5d07-2937-906b-b2342470b677) for non Bukkit type: net.citizensnpcs.nms.v1_12_R1.entity.EntityHumanNPC$PlayerNPC
[21:46:30 INFO]: Liquidatie issued server command: /skycarheist
[21:46:37 INFO]: Liquidatie issued server command: /skycarheist stop
[21:46:37 INFO]: [SkyCarHeist] [debug] Cancelling mission vehicle RX-LO-KT.
[21:46:37 INFO]: [SkyCarHeist] [debug] Cleaning up mission vehicle RX-LO-KT.
[21:46:37 INFO]: [SkyCarHeist] [debug] Requesting MTVehicles cleanup for plate RX-LO-KT.
[21:46:37 INFO]: [SkyCarHeist] [debug] Next automatic mission spawn is scheduled in 30 minute(s).
[21:46:46 INFO]: MRxPlaySafeCard issued server command: /tp Liquidatie
[21:47:05 INFO]: MRxPlaySafeCard issued server command: /gm 0 Liquidatie
Trace the repeated enter/leave/pickup events and fix the mission-car interaction so the player can actually drive it.
These logs show the updated plugin is working through the mission start: the car spawned, and entering it started the heist at 21:45:54. It wasn’t cleaned up until you ran /skycarheist stop at 21:46:37.
The repeated enter → leave → pickup events suggest the car is being interacted with again right after entering. SkyCarHeist cancels the pickup event so the mission car can’t be taken as an item; its handlers don’t eject the player. Try right-clicking once to enter, then stop interacting with the car and use your MTVehicles driving controls.
No new code change was made, so you don’t need to recompile for this log.
The car does not spawn? It spawns for a second and dissapears
Plan:
Treat the first successful location or spawned-plate check as confirmation.
Don’t despawn the car later just because MTVehicles temporarily returns no location.
Updated the mission check so that once MTVehicles confirms the car’s location or spawned plate, a later temporary “not found” result won’t trigger SkyCarHeist’s cleanup and despawn it. Compile the project and test spawning again.
package com.kodari.skycarheist;
import com.kodari.skycarheist.integration.CitizensBridge;
import com.kodari.skycarheist.integration.MtVehiclesBridge;
import net.milkbowl.vault.economy.Economy;
import org.bukkit.Bukkit;
import org.bukkit.plugin.RegisteredServiceProvider;
import org.bukkit.plugin.java.JavaPlugin;
public final class SkyCarHeistPlugin extends JavaPlugin {
private HeistManager heistManager;
private Economy economy;
@Override
public void onEnable() {
saveDefaultConfig();
if (getConfig().getBoolean("debug", false)) {
getLogger().info("[debug] Diagnostic logging is enabled.");
}
if (!requirePlugin("MTVehicles") || !requirePlugin("Citizens") || !requirePlugin("Vault")) {
getServer().getPluginManager().disablePlugin(this);
return;
}
RegisteredServiceProvider<Economy> registration = getServer().getServicesManager().getRegistration(Economy.class);
if (registration == null || registration.getProvider() == null) {
getLogger().severe("Vault is present, but no economy provider is registered. SkyCarHeist is disabled.");
getServer().getPluginManager().disablePlugin(this);
return;
}
economy = registration.getProvider();
try {
MtVehiclesBridge vehicles = new MtVehiclesBridge(this);
CitizensBridge citizens = new CitizensBridge(this);
heistManager = new HeistManager(this, vehicles, citizens, economy);
vehicles.registerEvents(heistManager);
getCommand("skycarheist").setExecutor(new SkyCarHeistCommand(this, heistManager));
getCommand("skycarheist").setTabCompleter(new SkyCarHeistCommand(this, heistManager));
heistManager.start();
getLogger().info("SkyCarHeist enabled. MTVehicles vehicle operations use the documented 2.5.x API.");
} catch (Exception exception) {
getLogger().severe("SkyCarHeist could not initialize its integrations: " + exception.getMessage());
exception.printStackTrace();
getServer().getPluginManager().disablePlugin(this);
}
}
private boolean requirePlugin(String name) {
if (Bukkit.getPluginManager().getPlugin(name) != null && Bukkit.getPluginManager().isPluginEnabled(name)) {
return true;
}
getLogger().severe("Required plugin " + name + " was not found or is disabled. SkyCarHeist is disabled.");
return false;
}
@Override
public void onDisable() {
if (getConfig().getBoolean("debug", false)) {
getLogger().info("[debug] Disabling SkyCarHeist.");
}
if (heistManager != null) {
heistManager.shutdown();
}
}
public Economy getEconomy() {
return economy;
}
}