mirror of
https://github.com/Melledy/Grasscutter.git
synced 2024-11-26 23:32:43 +00:00
Bug fixes & class updates
This commit is contained in:
parent
694b5c1548
commit
91a2a55ed9
@ -104,7 +104,7 @@ public class Account {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public boolean hasPermission(String permission) {
|
public boolean hasPermission(String permission) {
|
||||||
return this.permissions.contains(permission) || this.permissions.contains("*") ? true : false;
|
return this.permissions.contains(permission) || this.permissions.contains("*");
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean removePermission(String permission) {
|
public boolean removePermission(String permission) {
|
||||||
|
@ -2,7 +2,7 @@ package emu.grasscutter.plugin.api;
|
|||||||
|
|
||||||
import emu.grasscutter.command.Command;
|
import emu.grasscutter.command.Command;
|
||||||
import emu.grasscutter.command.CommandHandler;
|
import emu.grasscutter.command.CommandHandler;
|
||||||
import emu.grasscutter.game.GenshinPlayer;
|
import emu.grasscutter.game.player.Player;
|
||||||
import emu.grasscutter.server.dispatch.DispatchServer;
|
import emu.grasscutter.server.dispatch.DispatchServer;
|
||||||
import emu.grasscutter.server.game.GameServer;
|
import emu.grasscutter.server.game.GameServer;
|
||||||
|
|
||||||
@ -55,7 +55,7 @@ public final class ServerHook {
|
|||||||
* Gets all online players.
|
* Gets all online players.
|
||||||
* @return Players connected to the server.
|
* @return Players connected to the server.
|
||||||
*/
|
*/
|
||||||
public List<GenshinPlayer> getOnlinePlayers() {
|
public List<Player> getOnlinePlayers() {
|
||||||
return new LinkedList<>(this.gameServer.getPlayers().values());
|
return new LinkedList<>(this.gameServer.getPlayers().values());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -209,7 +209,7 @@ public final class DispatchServer {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
private KeyManagerFactory createKeyManagerFactory(File keystore, String password) throws Exception {
|
private KeyManagerFactory createKeyManagerFactory(File keystore, String password) {
|
||||||
char[] pass = password.toCharArray();
|
char[] pass = password.toCharArray();
|
||||||
KeyManagerFactory kmf = null;
|
KeyManagerFactory kmf = null;
|
||||||
|
|
||||||
@ -220,8 +220,8 @@ public final class DispatchServer {
|
|||||||
|
|
||||||
kmf = KeyManagerFactory.getInstance("SunX509");
|
kmf = KeyManagerFactory.getInstance("SunX509");
|
||||||
kmf.init(ks, pass);
|
kmf.init(ks, pass);
|
||||||
} catch (Exception e) {
|
} catch (Exception exception) {
|
||||||
throw e;
|
Grasscutter.getLogger().error("Unable to load keystore.", exception);
|
||||||
}
|
}
|
||||||
|
|
||||||
return kmf;
|
return kmf;
|
||||||
@ -257,7 +257,7 @@ public final class DispatchServer {
|
|||||||
server = this.safelyCreateServer(this.getAddress());
|
server = this.safelyCreateServer(this.getAddress());
|
||||||
}
|
}
|
||||||
|
|
||||||
HttpsServer httpsServer = null;
|
HttpsServer httpsServer;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
httpsServer = HttpsServer.create(getAddress(), 0);
|
httpsServer = HttpsServer.create(getAddress(), 0);
|
||||||
|
Loading…
Reference in New Issue
Block a user