- Update logging message in reloadConfig method for accuracy.
- Add permission check for player login event. - Add a Jenkinsfile for CI pipeline configuration.
This commit is contained in:
parent
6ef20f8fd6
commit
df8f08544b
20
Jenkinsfile
vendored
Normal file
20
Jenkinsfile
vendored
Normal file
|
|
@ -0,0 +1,20 @@
|
||||||
|
pipeline {
|
||||||
|
agent any
|
||||||
|
stages {
|
||||||
|
stage('Gradle') {
|
||||||
|
steps {
|
||||||
|
sh 'bash gradlew build'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stage('Archive') {
|
||||||
|
steps {
|
||||||
|
archiveArtifacts artifacts: 'build/libs/', followSymlinks: false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stage('discord') {
|
||||||
|
steps {
|
||||||
|
discordSend description: "Build: ${BUILD_NUMBER}", showChangeset: true, result: currentBuild.currentResult, title: currentBuild.fullProjectName, webhookURL: env.discordwebhook
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -33,7 +33,7 @@ public class WebInterface {
|
||||||
|
|
||||||
public void reloadConfig() {
|
public void reloadConfig() {
|
||||||
Config.init();
|
Config.init();
|
||||||
log.info("Reloaded ShutdownInfo config.");
|
log.info("Reloaded WebInterface config.");
|
||||||
}
|
}
|
||||||
|
|
||||||
public void loadCommands() {// all (proxy)commands go here
|
public void loadCommands() {// all (proxy)commands go here
|
||||||
|
|
|
||||||
|
|
@ -33,6 +33,10 @@ public class ProxyPlayerListener {
|
||||||
final Player player = event.getPlayer();
|
final Player player = event.getPlayer();
|
||||||
final UUID uuid = player.getUniqueId();
|
final UUID uuid = player.getUniqueId();
|
||||||
|
|
||||||
|
if (!player.hasPermission("command.proxy.login")) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
boolean playerBanned = Database.get().isPlayerBanned(uuid, null);
|
boolean playerBanned = Database.get().isPlayerBanned(uuid, null);
|
||||||
if (!playerBanned) {
|
if (!playerBanned) {
|
||||||
return;
|
return;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user