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:
Georg Hagen 2014-12-02 15:38:13 +01:00
parent 4b34569729
commit 94f82511df
4 changed files with 6 additions and 6 deletions

View File

@ -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

View File

@ -161,7 +161,7 @@ public class Backpack
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())

View File

@ -112,7 +112,7 @@ public class MySQL extends Database
{
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 class MySQL extends Database
{
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("-", ""));

View File

@ -119,7 +119,7 @@ public class SQLite extends Database
{
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 class SQLite extends Database
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("-", ""));