Cachechanges
Dieser Commit ist enthalten in:
Ursprung
cecd3edfe5
Commit
2e63e8fa15
@ -36,8 +36,13 @@ public class BauweltMember{
|
|||||||
this(bauweltID, memberID, build, changeGM, teleport, worldEdit, testblock, true);
|
this(bauweltID, memberID, build, changeGM, teleport, worldEdit, testblock, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public BauweltMember(UUID bauweltID, UUID memberID, boolean build, boolean changeGM, boolean teleport, boolean worldEdit, boolean testblock){
|
||||||
|
this(WarkingUser.get(bauweltID).getId(), WarkingUser.get(memberID).getId(), build, changeGM, teleport, worldEdit, testblock, true);
|
||||||
|
}
|
||||||
|
|
||||||
public void remove(){
|
public void remove(){
|
||||||
sql.update("DELETE FROM BauweltMember WHERE BauweltID = ? AND MemberID = ?");
|
sql.update("DELETE FROM BauweltMember WHERE BauweltID = " + BauweltID + " AND MemberID = " + MemberID);
|
||||||
|
memberCache.remove(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void updateDB(){
|
private void updateDB(){
|
||||||
|
@ -1,7 +1,5 @@
|
|||||||
package de.warking.hunjy.MySQL;
|
package de.warking.hunjy.MySQL;
|
||||||
|
|
||||||
import org.bukkit.entity.Player;
|
|
||||||
|
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
@ -30,7 +28,7 @@ public class WarkingUser {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public WarkingUser(String name){
|
public WarkingUser(String name){
|
||||||
ResultSet dbplayer = sql.select("SELECT * FROM UserData WHERE UserName = '" + name + "'");
|
ResultSet dbplayer = sql.select("SELECT * FROM UserData WHERE lower(UserName) = '" + name.toLowerCase() + "'");
|
||||||
init(dbplayer);
|
init(dbplayer);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -65,7 +63,7 @@ public class WarkingUser {
|
|||||||
|
|
||||||
public static WarkingUser get(String userName){
|
public static WarkingUser get(String userName){
|
||||||
for(WarkingUser user : allUsers)
|
for(WarkingUser user : allUsers)
|
||||||
if(user.UserName.equals(userName))
|
if(user.UserName.equalsIgnoreCase(userName))
|
||||||
return user;
|
return user;
|
||||||
WarkingUser offline = new WarkingUser(userName);
|
WarkingUser offline = new WarkingUser(userName);
|
||||||
allUsers.remove(offline);
|
allUsers.remove(offline);
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren