mirror of
https://github.com/EarthMC/QuickShop-Reremake.git
synced 2026-11-24 17:39:52 -05:00
Add language copyright infomation print
Former-commit-id: 5a6456b58db5d72abaccac69e01acf490a2cf219 [formerly 1c5eecf1028e8df2c589f92879835460b514eb7c] Former-commit-id: 6accdd9f85676a43dd0eb27c7f8eea22aa955602
This commit is contained in:
1 parent
5b8627329d
commit
87cd83d3cf
2 files changed
+14
-1
No files matched your search
@@ -106,6 +106,12 @@ public class DatabaseHelper {
|
||||
PreparedStatement ps = db.getConnection().prepareStatement("SELECT * FROM "+QuickShop.instance.dbPrefix+"shops");
|
||||
return ps.executeQuery();
|
||||
|
||||
}
|
||||
public static ResultSet selectAllMessages(Database db) throws SQLException {
|
||||
connectCheck();
|
||||
PreparedStatement ps = db.getConnection().prepareStatement("SELECT * FROM "+QuickShop.instance.dbPrefix+"messages");
|
||||
return ps.executeQuery();
|
||||
|
||||
}
|
||||
public static void removeShop(Database db, int x, int y, int z, String worldName) throws SQLException {
|
||||
connectCheck();
|
||||
|
||||
@@ -25,6 +25,7 @@ import org.bukkit.inventory.ItemStack;
|
||||
import org.bukkit.inventory.meta.EnchantmentStorageMeta;
|
||||
import org.bukkit.potion.PotionEffectType;
|
||||
import org.maxgamer.quickshop.QuickShop;
|
||||
import org.maxgamer.quickshop.Database.DatabaseHelper;
|
||||
import org.maxgamer.quickshop.Shop.Shop;
|
||||
|
||||
import net.md_5.bungee.api.chat.ClickEvent;
|
||||
@@ -68,6 +69,12 @@ public class MsgUtil {
|
||||
messages.set("language-version", 1);
|
||||
}
|
||||
updateMessages(messages.getInt("language-version"));
|
||||
|
||||
//Print language copyright infomation
|
||||
plugin.getLogger().info(messages.getString("language-author"));
|
||||
plugin.getLogger().info(messages.getString("language-contributors"));
|
||||
plugin.getLogger().info(messages.getString("language-country"));
|
||||
plugin.getLogger().info(messages.getString("language-version"));
|
||||
}
|
||||
|
||||
public static void updateMessages(int selectedVersion) {
|
||||
@@ -219,7 +226,7 @@ public class MsgUtil {
|
||||
public static void loadTransactionMessages() {
|
||||
player_messages.clear(); // Delete old messages
|
||||
try {
|
||||
ResultSet rs = plugin.getDB().getConnection().prepareStatement("SELECT * FROM messages").executeQuery();
|
||||
ResultSet rs = DatabaseHelper.selectAllMessages(plugin.getDB());
|
||||
while (rs.next()) {
|
||||
UUID owner = UUID.fromString(rs.getString("owner"));
|
||||
String message = rs.getString("message");
|
||||
|
||||
Reference in new issue
Block a user