Mirror von
https://github.com/IntellectualSites/FastAsyncWorldEdit.git
synchronisiert 2024-11-08 04:20:06 +01:00
Changed the sessions map to index by player name as a string.
Dieser Commit ist enthalten in:
Ursprung
dbd6c48cee
Commit
06c25e2c88
@ -62,8 +62,8 @@ public class WorldEdit {
|
|||||||
* without any WorldEdit abilities or never use WorldEdit in a session will
|
* without any WorldEdit abilities or never use WorldEdit in a session will
|
||||||
* not have a session object generated for them.
|
* not have a session object generated for them.
|
||||||
*/
|
*/
|
||||||
private HashMap<LocalPlayer,LocalSession> sessions =
|
private HashMap<String,LocalSession> sessions =
|
||||||
new HashMap<LocalPlayer,LocalSession>();
|
new HashMap<String,LocalSession>();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* List of commands. These are checked when the command event is called, so
|
* List of commands. These are checked when the command event is called, so
|
||||||
@ -189,8 +189,8 @@ public class WorldEdit {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public LocalSession getSession(LocalPlayer player) {
|
public LocalSession getSession(LocalPlayer player) {
|
||||||
if (sessions.containsKey(player)) {
|
if (sessions.containsKey(player.getName())) {
|
||||||
return sessions.get(player);
|
return sessions.get(player.getName());
|
||||||
}
|
}
|
||||||
|
|
||||||
LocalSession session = new LocalSession();
|
LocalSession session = new LocalSession();
|
||||||
@ -223,7 +223,7 @@ public class WorldEdit {
|
|||||||
|| !player.hasPermission("worldeditunlimited")));
|
|| !player.hasPermission("worldeditunlimited")));
|
||||||
|
|
||||||
// Remember the session
|
// Remember the session
|
||||||
sessions.put(player, session);
|
sessions.put(player.getName(), session);
|
||||||
|
|
||||||
return session;
|
return session;
|
||||||
}
|
}
|
||||||
@ -235,7 +235,7 @@ public class WorldEdit {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public boolean hasSession(LocalPlayer player) {
|
public boolean hasSession(LocalPlayer player) {
|
||||||
return sessions.containsKey(player);
|
return sessions.containsKey(player.getName());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1866,7 +1866,7 @@ public class WorldEdit {
|
|||||||
* @param player
|
* @param player
|
||||||
*/
|
*/
|
||||||
public void removeSession(LocalPlayer player) {
|
public void removeSession(LocalPlayer player) {
|
||||||
sessions.remove(player);
|
sessions.remove(player.getName());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren