Следуйте инструкциям в видео ниже, чтобы узнать, как установить наш сайт как веб-приложение на главный экран вашего устройства.
Примечание: Эта функция может быть недоступна в некоторых браузерах.
package crypto.db;
public class Db {
[skiped]
public Region getRegion(Connection conn, int x, int y, int z) {
Connection connection = conn == null ? this.connection : conn;
try (PreparedStatement statement = connection.prepareStatement(
"SELECT * FROM regions WHERE x1 <= ? and x2 >= ? and y1 <= ? and y2 >= ? and z1 <= ? and z2 >= ?")) {
statement.setInt(1, x);
statement.setInt(2, x);
statement.setInt(3, y);
statement.setInt(4, y);
statement.setInt(5, z);
statement.setInt(6, z);
//System.out.println(statement.toString());
ResultSet resultSet = statement.executeQuery();
if(resultSet.next()) {
Region region = new Region();
region.name = resultSet.getString("name");
region.player = resultSet.getString("player");
region.payedTo = resultSet.getLong("payedto");
region.x1 = resultSet.getInt("x1");
region.x2 = resultSet.getInt("x2");
region.y1 = resultSet.getInt("y1");
region.y2 = resultSet.getInt("y2");
region.z1 = resultSet.getInt("z1");
region.z2 = resultSet.getInt("z2");
region.isQuest = resultSet.getBoolean("quest");
return region;
}
return null;
} catch (SQLException e) {
e.printStackTrace();
return null;
}
}
[skiped]
package crypto.db;
import java.math.BigDecimal;
public class Region {
public String name;
public String player;
public int x1;
public int x2;
public int y1;
public int y2;
public int z1;
public int z2;
public long payedTo;
public boolean isQuest;
}
[skiped]
at java.lang.Thread.run(Thread.java:833) [?:?]
Caused by: java.lang.NoClassDefFoundError: crypto/db/Region
at crypto.db.Db.getRegion(Db.java:306) ~[?:?]
at crypto.Main.onPlayerInteract(Main.java:675) ~[?:?]
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[?:?]
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
at java.lang.reflect.Method.invoke(Method.java:568) ~[?:?]
at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:306) ~[spigot-api-1.18.1-R0.1-SNAPSHOT.jar:?]
... 22 more
Caused by: java.lang.ClassNotFoundException: crypto.db.Region
at org.bukkit.plugin.java.PluginClassLoader.loadClass0(PluginClassLoader.java:147) ~[spigot-api-1.18.1-R0.1-SNAPSHOT.jar:?]
at org.bukkit.plugin.java.PluginClassLoader.loadClass(PluginClassLoader.java:99) ~[spigot-api-1.18.1-R0.1-SNAPSHOT.jar:?]
at java.lang.ClassLoader.loadClass(ClassLoader.java:520) ~[?:?]
at crypto.db.Db.getRegion(Db.java:306) ~[?:?]
at crypto.Main.onPlayerInteract(Main.java:675) ~[?:?]
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[?:?]
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
at java.lang.reflect.Method.invoke(Method.java:568) ~[?:?]
at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:306) ~[spigot-api-1.18.1-R0.1-SNAPSHOT.jar:?]
... 22 more
Ну как бы сказать, ошибка относительно понятна. Мне не понятно происхождение.ClassNotFoundException вызывается при отсутствии класса. Чего непонятного то?
Зачем удалять-то? ПростоЕсли проект собирается maven'ом достаточно ли будет удалять папку сборки target?