Caused by: java.lang.NullPointerException: Cannot invoke "nl.mtvehicles.core.Main.getDataFolder()" because "nl.mtvehicles.core.Main.instance" is null at nl.mtvehicles.core.infrastructure.dataconfig.MessagesConfig.saveLanguageFile(MessagesConfig.java:112) ~[DragonMainCore.jar:?] at nl.mtvehicles.core.infrastructure.dataconfig.MessagesConfig.<init>(MessagesConfig.java:29) ~[DragonMainCore.jar:?] at nl.mtvehicles.core.infrastructure.modules.ConfigModule.<clinit>(ConfigModule.java:35) ~[DragonMainCore.jar:?] at nl.mtvehicles.core.infrastructure.vehicle.VehicleUtils.createAndGetItemByUUID(VehicleUtils.java:200) ~[DragonMainCore.jar:?]
#api problem
131 messages · Page 1 of 1 (latest)
package me.barsam.dragonMainCore
import nl.mtvehicles.core.infrastructure.modules.ConfigModule
import nl.mtvehicles.core.infrastructure.vehicle.VehicleUtils
import org.bukkit.command.Command
import org.bukkit.command.CommandSender
import org.bukkit.entity.Player
import org.bukkit.plugin.java.JavaPlugin
class DragonMainCore : JavaPlugin() {
override fun onEnable() {
// Register commands
getCommand("spawnit")?.setExecutor(this)
}
override fun onCommand(sender: CommandSender, command: Command, label: String, args: Array<String>): Boolean {
if (sender !is Player) {
sender.sendMessage("Only players can execute this command.")
return true
}
val player = sender
if (command.name.equals("spawnit", ignoreCase = true)) {
try {
// Create a vehicle item using VehicleUtils
val car = VehicleUtils.createAndGetItemByUUID(player, "C4UQZJ")
player.inventory.addItem(car)
} catch (e: Exception) {
player.sendMessage("Failed to spawn the vehicle: ${e.message}")
e.printStackTrace()
}
return true
}
return false
}
override fun onDisable() {
// Plugin shutdown logic
}
}
idk whats happenin in api!
Did you use #1256563966759407626 or newest file on Spigot?
@fresh void
yeah i do
can you tell me which one should i use?
ima test them all but like if u know the main bug its from
ok now theres no VehicleUtils?
\
Wait, what
<dependency>
<groupId>nl.mtvehicles</groupId>
<artifactId>core</artifactId>
<version>2.5.0</version>
<scope>system</scope>
<systemPath>${project.basedir}/libs/MTVehicles.jar</systemPath>
</dependency>
am i doing something wrong?
WWAAAIT
YOU ADDED A REPOSITORY?
FR?
WHEN
About 6 months ago
package me.barsam.dragonMainCore
import nl.mtvehicles.core.infrastructure.modules.ConfigModule
import nl.mtvehicles.core.infrastructure.vehicle.VehicleUtils
import org.bukkit.command.Command
import org.bukkit.command.CommandSender
import org.bukkit.entity.Player
import org.bukkit.plugin.java.JavaPlugin
class DragonMainCore : JavaPlugin() {
override fun onEnable() {
// Register commands
getCommand("spawnit")?.setExecutor(this)
}
override fun onCommand(sender: CommandSender, command: Command, label: String, args: Array<String>): Boolean {
if (sender !is Player) {
sender.sendMessage("Only players can execute this command.")
return true
}
val player = sender
if (command.name.equals("spawnit", ignoreCase = true)) {
try {
// Create a vehicle item using VehicleUtils
val car = VehicleUtils.createAndGetItemByUUID(player, "C4UQZJ")
player.inventory.addItem(car)
} catch (e: Exception) {
player.sendMessage("Failed to spawn the vehicle: ${e.message}")
e.printStackTrace()
}
return true
}
return false
}
override fun onDisable() {
// Plugin shutdown logic
}
}
<dependency>
<groupId>nl.mtvehicles.core</groupId>
<artifactId>MTVehicles</artifactId>
<version>2.5.5</version>
</dependency>
<repository>
<id>gomorrha-repo</id>
<url>https://repo.repsy.io/mvn/gomorrha/mtvehicles/</url>
</repository>
any ideas? @azure shadow
Did you add MTV as a dependency in plugin.yml?
yes i do
depend:
- MTVehicles
depend:
- MTVehicles
Weird, i dont know how but you managed to access Mtv before It loads correctly

WT
so what should i do
like should do something to like wait 30 seconds then register everything?
Can you use the newest file from #1256563966759407626 without any errors (Not the api just normal spawning of the vehicle)
i even test it with skript and it worked but the api how many times i test it nothings happenin
im using java 17
Could you send me your server startup log?
i did change it and nothing happens
there you go
And could I have your plugin .jar?
there you go
i forgot to delete the libs folder ignore that
I should have the problem solved by tomorrow.
thanks for the support.
Okey the good thing is, it works now
The bad thing is, for whatever reason it doesnt work with Kotlin (and that doesnt make any sense)
Java MainClass:
package dev.gomorrha.mtvspawncar;
import nl.mtvehicles.core.infrastructure.vehicle.VehicleUtils;
import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import org.bukkit.inventory.ItemStack;
import org.bukkit.plugin.java.JavaPlugin;
public class Mtvspawncar extends JavaPlugin implements CommandExecutor {
@Override
public void onEnable() {
// Register commands
if (getCommand("spawnit") != null) {
getCommand("spawnit").setExecutor(this);
}
// Check if MTVehicles is enabled, otherwise disable this plugin
if (!getServer().getPluginManager().isPluginEnabled("MTVehicles")) {
getServer().getPluginManager().disablePlugin(this);
}
}
@Override
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
if (!(sender instanceof Player)) {
sender.sendMessage("Only players can execute this command.");
return true;
}
Player player = (Player) sender;
if (command.getName().equalsIgnoreCase("spawnit")) {
try {
// Create a vehicle item using VehicleUtils
// Replace "C4UQZJ" with your vehicle UUID or ID
ItemStack car = VehicleUtils.createAndGetItemByUUID(player, "C4UQZJ");
player.getInventory().addItem(car);
} catch (Exception e) {
player.sendMessage("Failed to spawn the vehicle: " + e.getMessage());
e.printStackTrace();
}
return true;
}
return false;
}
@Override
public void onDisable() {
// Plugin shutdown logic
}
}
Plugin.yml:
name: mtvspawncar
version: '1.0-SNAPSHOT'
main: dev.gomorrha.mtvspawncar.Mtvspawncar
api-version: '1.21'
depends: [MTVehicles]
commands:
spawnit:
usage: "/spawnit"
description: Spawn a vehicle
@fresh void
oh
thanks buddy
let me try it out
again, thanks for the support really fast <3
a new erro great...
WTF why its giving a error from model engine ? :|
@azure shadow
Weird, maby you use diamond hoes for ModelEngine?
no idont
cause its a raw test server
only has the mtv and the garage [you gave me]
2.5.5
im using that
idk why its doing this
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>me.barsam</groupId>
<artifactId>DragonGarageCore</artifactId>
<version>1.0</version>
<packaging>jar</packaging>
<name>DragonGarageCore</name>
<properties>
<java.version>17</java.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<build>
<defaultGoal>clean package</defaultGoal>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.13.0</version>
<configuration>
<source>${java.version}</source>
<target>${java.version}</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.5.3</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
</resource>
</resources>
</build>
<repositories>
<repository>
<id>papermc-repo</id>
<url>https://repo.papermc.io/repository/maven-public/</url>
</repository>
<repository>
<id>gomorrha-repo</id>
<url>https://repo.repsy.io/mvn/gomorrha/mtvehicles/</url>
</repository>
<repository>
<id>sonatype</id>
<url>https://oss.sonatype.org/content/groups/public/</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>io.papermc.paper</groupId>
<artifactId>paper-api</artifactId>
<version>1.20.4-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>nl.mtvehicles.core</groupId>
<artifactId>MTVehicles</artifactId>
<version>2.5.5</version>
</dependency>
</dependencies>
</project>
package me.barsam.dragonGarageCore;
import nl.mtvehicles.core.infrastructure.vehicle.VehicleUtils;
import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import org.bukkit.inventory.ItemStack;
import org.bukkit.plugin.java.JavaPlugin;
public class DragonGarageCore extends JavaPlugin implements CommandExecutor {
@Override
public void onEnable() {
// Register commands
if (getCommand("spawnit") != null) {
getCommand("spawnit").setExecutor(this);
}
// Check if MTVehicles is enabled, otherwise disable this plugin
if (!getServer().getPluginManager().isPluginEnabled("MTVehicles")) {
getServer().getPluginManager().disablePlugin(this);
}
}
@Override
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
if (!(sender instanceof Player)) {
sender.sendMessage("Only players can execute this command.");
return true;
}
Player player = (Player) sender;
if (command.getName().equalsIgnoreCase("spawnit")) {
try {
// Create a vehicle item using VehicleUtils
// Replace "C4UQZJ" with your vehicle UUID or ID
ItemStack car = VehicleUtils.createAndGetItemByUUID(player, "C4UQZJ");
player.getInventory().addItem(car);
} catch (Exception e) {
player.sendMessage("Failed to spawn the vehicle: " + e.getMessage());
e.printStackTrace();
}
return true;
}
return false;
}
@Override
public void onDisable() {
// Plugin shutdown logic
}
}
@azure shadow
Do you have modelEngine intsalled?
Nope
You did use that one, right? #1256563966759407626 message
i used the api from the repository vresion 2.5.5 and the last file you uploaded here
asdasd
i fixed it
some how
idk how
but i did

thanks allot @azure shadow <3
hello quick question how could i show the cars as a preview?
like i dont want the car to have a owner i just want to spawn it to show it to other people...
@azure shadow ||sorry for the mention||
Why don't you simply spawn a vehicle with an owner, but then no longer move it?
cause maybe that saves into the VehicleData.yml?
and it takes allot of spaces?
How many of these Preview Vehicles do you want to spawn?
One vehicle takes 494bytes of space
u see its a preview shop
players will go into a spec mode
then we spawn the car infront of the player
likely showing the player a preview which they can do next and etc
so it takes allot of spawn per shop
roughly 2000 in a day :(
if i said roughly right
But you delete the vehicles afterwards!?
And why not spawn them all once and then teleport the player?
WAI-

your right but idk like
yeah youre right
ohhh i know why
cause i delete all the cars every 30 minutes
and when server shuts down
that was why
for some reason when i use VehicleUtils.deleteVehicle(); would it get deleted from the data file?\
It should get deted from the data file, yes
ok, thanks again
btw why did i said for some reason?