Added Server Player Commands section.
This commit is contained in:
BigPappa committed 2026-08-15 09:08:04 -05:00
1 parent 25a83e7dc5
commit 293be5887a
128 files changed
+2182 -408

No files matched your search

@@ -0,0 +1,73 @@
package com.rsscripting.rswarehouse.dao;
import com.rsscripting.rswarehouse.RSWarehouse;
import com.rsscripting.rswarehouse.database.DatabaseManager;
import org.bukkit.block.Block;
import java.sql.Connection;
import java.sql.PreparedStatement;
public class VerifyIsChestDAO {
public static boolean isWarehouseChest(
Block block
) {
try (
Connection connection =
DatabaseManager.getConnection()
) {
PreparedStatement statement =
connection.prepareStatement(
"""
SELECT 1
FROM warehouse_chests
WHERE world = ?
AND x = ?
AND y = ?
AND z = ?
"""
);
statement.setString(
1,
block.getWorld().getName()
);
statement.setInt(
2,
block.getX()
);
statement.setInt(
3,
block.getY()
);
statement.setInt(
4,
block.getZ()
);
return statement.executeQuery().next();
}
catch (Exception e) {
RSWarehouse.getInstance()
.getLogger()
.severe(
"Failed checking Community Warehouse chest registration."
);
}
return false;
}
}