mirror of
https://github.com/AuthMe/AuthMeReloaded.git
synced 2025-02-11 01:11:32 +01:00
xAuth 2.6 compatibility
This commit is contained in:
parent
8a33b65538
commit
17e81aada3
@ -11,7 +11,7 @@ import java.util.List;
|
||||
import org.bukkit.command.CommandSender;
|
||||
|
||||
import de.luricos.bukkit.xAuth.xAuth;
|
||||
import de.luricos.bukkit.xAuth.database.Table;
|
||||
import de.luricos.bukkit.xAuth.database.DatabaseTables;
|
||||
import de.luricos.bukkit.xAuth.utils.xAuthLog;
|
||||
import fr.xephi.authme.AuthMe;
|
||||
import fr.xephi.authme.cache.auth.PlayerAuth;
|
||||
@ -66,7 +66,7 @@ public class newxAuthToFlat {
|
||||
PreparedStatement ps = null;
|
||||
ResultSet rs = null;
|
||||
try {
|
||||
String sql = String.format("SELECT `playername` FROM `%s` WHERE `id` = ?", xAuth.getPlugin().getDatabaseController().getTable(Table.ACCOUNT));
|
||||
String sql = String.format("SELECT `playername` FROM `%s` WHERE `id` = ?", xAuth.getPlugin().getDatabaseController().getTable(DatabaseTables.ACCOUNT));
|
||||
ps = conn.prepareStatement(sql);
|
||||
ps.setInt(1, id);
|
||||
rs = ps.executeQuery();
|
||||
@ -88,7 +88,7 @@ public class newxAuthToFlat {
|
||||
PreparedStatement ps = null;
|
||||
ResultSet rs = null;
|
||||
try {
|
||||
String sql = String.format("SELECT * FROM `%s`", xAuth.getPlugin().getDatabaseController().getTable(Table.ACCOUNT));
|
||||
String sql = String.format("SELECT * FROM `%s`", xAuth.getPlugin().getDatabaseController().getTable(DatabaseTables.ACCOUNT));
|
||||
ps = conn.prepareStatement(sql);
|
||||
rs = ps.executeQuery();
|
||||
while (rs.next()) {
|
||||
@ -109,7 +109,7 @@ public class newxAuthToFlat {
|
||||
PreparedStatement ps = null;
|
||||
ResultSet rs = null;
|
||||
try {
|
||||
String sql = String.format("SELECT `password`, `pwtype` FROM `%s` WHERE `id` = ?", xAuth.getPlugin().getDatabaseController().getTable(Table.ACCOUNT));
|
||||
String sql = String.format("SELECT `password`, `pwtype` FROM `%s` WHERE `id` = ?", xAuth.getPlugin().getDatabaseController().getTable(DatabaseTables.ACCOUNT));
|
||||
ps = conn.prepareStatement(sql);
|
||||
ps.setInt(1, accountId);
|
||||
rs = ps.executeQuery();
|
||||
|
@ -300,16 +300,19 @@ public class SharedFileInputStream extends BufferedInputStream
|
||||
private int read1(byte[] b, int off, int len) throws IOException {
|
||||
int avail = count - pos;
|
||||
if (avail <= 0) {
|
||||
|
||||
/*
|
||||
if (false) {
|
||||
/* If the requested length is at least as large as the buffer, and
|
||||
if there is no mark/reset activity, do not bother to copy the
|
||||
bytes into the local buffer. In this way buffered streams will
|
||||
cascade harmlessly. */
|
||||
cascade harmlessly. */ /*
|
||||
if (len >= buf.length && markpos < 0) {
|
||||
// XXX - seek, update bufpos - how?
|
||||
return in.read(b, off, len);
|
||||
}
|
||||
}
|
||||
}*/
|
||||
|
||||
fill();
|
||||
avail = count - pos;
|
||||
if (avail <= 0) return -1;
|
||||
|
Loading…
Reference in New Issue
Block a user