mirror of
https://github.com/GeorgH93/Minepacks.git
synced 2024-12-31 18:17:49 +01:00
Update to V1.1
Bugfix where increasing the size of the backpack caused the first item in it to clone
This commit is contained in:
parent
4b34569729
commit
94f82511df
@ -2,7 +2,7 @@ name: MinePacks
|
||||
author: GeorgH93
|
||||
website: http://dev.bukkit.org/bukkit-plugins/minepacks/
|
||||
main: at.pcgamingfreaks.georgh.MinePacks.MinePacks
|
||||
version: 1.0.0.1
|
||||
version: 1.1.0.0
|
||||
commands:
|
||||
backpack:
|
||||
description: Main command
|
||||
|
@ -161,7 +161,7 @@ public List<ItemStack> setSize(int newSize)
|
||||
bp = Bukkit.createInventory(null, newSize, title);
|
||||
for(int i = 0; i < itsa.length; i++)
|
||||
{
|
||||
bp.setItem(i, itsa[0]);
|
||||
bp.setItem(i, itsa[i]);
|
||||
}
|
||||
size = newSize;
|
||||
for(Entry<Player, Boolean> e : opend.entrySet())
|
||||
|
@ -112,7 +112,7 @@ private void CheckDB()
|
||||
{
|
||||
Statement stmt = GetConnection().createStatement();
|
||||
stmt.execute("CREATE TABLE IF NOT EXISTS `" + Table_Players + "` (`player_id` INT UNSIGNED NOT NULL AUTO_INCREMENT, `name` CHAR(16) NOT NULL UNIQUE, PRIMARY KEY (`player_id`));");
|
||||
if(plugin.config.UseUUIDs())
|
||||
if(plugin.UseUUIDs)
|
||||
{
|
||||
try
|
||||
{
|
||||
@ -151,7 +151,7 @@ public void run()
|
||||
{
|
||||
PreparedStatement ps;
|
||||
Connection con = DriverManager.getConnection("jdbc:mysql://" + plugin.config.GetMySQLHost() + "/" + plugin.config.GetMySQLDatabase(), plugin.config.GetMySQLUser(), plugin.config.GetMySQLPassword());;
|
||||
ps = con.prepareStatement("SELECT `player_id` FROM `" + Table_Players + "` WHERE " + ((plugin.UseUUIDs) ? "`uuid`=?;" : "`name`=?;"));
|
||||
ps = con.prepareStatement("SELECT `player_id` FROM `" + Table_Players + "` WHERE " + ((plugin.UseUUIDs) ? "`uuid`" : "`name`") + "=?;");
|
||||
if(plugin.UseUUIDs)
|
||||
{
|
||||
ps.setString(1, player.getUniqueId().toString().replace("-", ""));
|
||||
|
@ -119,7 +119,7 @@ private void CheckDB()
|
||||
{
|
||||
Statement stmt = GetConnection().createStatement();
|
||||
stmt.execute("CREATE TABLE IF NOT EXISTS `" + Table_Players + "` (`player_id` INTEGER PRIMARY KEY AUTOINCREMENT, `name` CHAR(16) NOT NULL UNIQUE);");
|
||||
if(plugin.config.UseUUIDs())
|
||||
if(plugin.UseUUIDs)
|
||||
{
|
||||
try
|
||||
{
|
||||
@ -148,7 +148,7 @@ public void UpdatePlayer(Player player)
|
||||
try
|
||||
{
|
||||
PreparedStatement ps;
|
||||
ps = GetConnection().prepareStatement("SELECT `player_id` FROM `" + Table_Players + "` WHERE " + ((plugin.UseUUIDs) ? "`uuid`=?;" : "`name`=?;"));
|
||||
ps = GetConnection().prepareStatement("SELECT `player_id` FROM `" + Table_Players + "` WHERE " + ((plugin.UseUUIDs) ? "`uuid`" : "`name`") + "=?;");
|
||||
if(plugin.UseUUIDs)
|
||||
{
|
||||
ps.setString(1, player.getUniqueId().toString().replace("-", ""));
|
||||
|
Loading…
Reference in New Issue
Block a user