Skip to content
This repository was archived by the owner on Jan 24, 2024. It is now read-only.

Commit 02e62f6

Browse files
authored
Remove game mode commands and add Qodana workflow file (#10)
This commit removes several game mode command files such as GMCommands, GamemodeSpectator, and others. It also adds a new file for Qodana code quality checks under a GitHub workflows directory. Additionally, other files like CommandManager.java and plugin.yml have been modified consistent with the removal of game mode commands. Furthermore, a new CherryCoreProxy.java file has been introduced.
1 parent 5b55ded commit 02e62f6

20 files changed

+304
-350
lines changed
+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: Qodana
2+
on:
3+
workflow_dispatch:
4+
pull_request:
5+
push:
6+
branches:
7+
- main
8+
9+
jobs:
10+
qodana:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v3
14+
with:
15+
fetch-depth: 0
16+
- name: 'Qodana Scan'
17+
uses: JetBrains/[email protected]
18+
env:
19+
QODANA_TOKEN: ${{ secrets.QODANA_TOKEN }}

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ atlassian-ide-plugin.xml
1818

1919
# Log file
2020
*.log
21+
qodana.yaml
2122

2223
# BlueJ files
2324
*.ctxt

pom.xml

+27
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,14 @@
7373
<id>placeholderapi</id>
7474
<url>https://repo.extendedclip.com/content/repositories/placeholderapi/</url>
7575
</repository>
76+
<repository>
77+
<id>sonatype-oss-snapshots1</id>
78+
<url>https://s01.oss.sonatype.org/content/repositories/snapshots/</url>
79+
</repository>
80+
<repository>
81+
<id>bungeecord-repo</id>
82+
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
83+
</repository>
7684
</repositories>
7785

7886
<dependencies>
@@ -82,6 +90,20 @@
8290
<version>1.20.2-R0.1-SNAPSHOT</version>
8391
<scope>provided</scope>
8492
</dependency>
93+
<dependency>
94+
<groupId>net.md-5</groupId>
95+
<artifactId>bungeecord-api</artifactId>
96+
<version>1.20-R0.1-SNAPSHOT</version>
97+
<type>jar</type>
98+
<scope>provided</scope>
99+
</dependency>
100+
<dependency>
101+
<groupId>net.md-5</groupId>
102+
<artifactId>bungeecord-api</artifactId>
103+
<version>1.20-R0.1-SNAPSHOT</version>
104+
<type>javadoc</type>
105+
<scope>provided</scope>
106+
</dependency>
85107
<dependency>
86108
<groupId>com.github.stefvanschie.inventoryframework</groupId>
87109
<artifactId>IF</artifactId>
@@ -110,5 +132,10 @@
110132
<version>5.4</version>
111133
<scope>provided</scope>
112134
</dependency>
135+
<dependency>
136+
<groupId>net.kyori</groupId>
137+
<artifactId>adventure-api</artifactId>
138+
<version>4.14.0</version>
139+
</dependency>
113140
</dependencies>
114141
</project>

qodana.yaml

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
#-------------------------------------------------------------------------------#
2+
# Qodana analysis is configured by qodana.yaml file #
3+
# https://www.jetbrains.com/help/qodana/qodana-yaml.html #
4+
#-------------------------------------------------------------------------------#
5+
version: "1.0"
6+
7+
#Specify inspection profile for code analysis
8+
profile:
9+
name: qodana.starter
10+
11+
#Enable inspections
12+
#include:
13+
# - name: <SomeEnabledInspectionId>
14+
15+
#Disable inspections
16+
#exclude:
17+
# - name: <SomeDisabledInspectionId>
18+
# paths:
19+
# - <path/where/not/run/inspection>
20+
21+
projectJDK: 17 #(Applied in CI/CD pipeline)
22+
23+
#Execute shell command before Qodana execution (Applied in CI/CD pipeline)
24+
#bootstrap: sh ./prepare-qodana.sh
25+
26+
#Install IDE plugins before Qodana execution (Applied in CI/CD pipeline)
27+
#plugins:
28+
# - id: <plugin.id> #(plugin id can be found at https://plugins.jetbrains.com)
29+
30+
#Specify Qodana linter for analysis (Applied in CI/CD pipeline)
31+
linter: jetbrains/qodana-jvm:latest

src/main/java/net/cherrycraft/cherrycore/command/CommandManager.java

+1-6
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
package net.cherrycraft.cherrycore.command;
2020

2121
import net.cherrycraft.cherrycore.CherryCore;
22-
import net.cherrycraft.cherrycore.command.commands.*;
22+
import net.cherrycraft.cherrycore.command.commands.Test;
2323
import net.cherrycraft.cherrycore.languageSystem.command.LanguageCommand;
2424
import net.cherrycraft.cherrycore.listener.CommandListener;
2525
import net.cherrycraft.cherrycore.manager.Command;
@@ -40,11 +40,6 @@ public CommandManager(CherryCore plugin) {
4040
this.plugin = plugin;
4141

4242
registerCommand(new LanguageCommand("language"));
43-
registerCommand(new GMCommands("gm"));
44-
registerCommand(new GamemodeCreative("gmc"));
45-
registerCommand(new GamemodeSurvival("gms"));
46-
registerCommand(new GamemodeAdventure("gma"));
47-
registerCommand(new GamemodeSpectator("gmsp"));
4843
registerCommand(new Test("test"));
4944
}
5045

src/main/java/net/cherrycraft/cherrycore/command/commands/GMCommands.java

-86
This file was deleted.

src/main/java/net/cherrycraft/cherrycore/command/commands/GamemodeAdventure.java

-61
This file was deleted.

src/main/java/net/cherrycraft/cherrycore/command/commands/GamemodeCreative.java

-60
This file was deleted.

0 commit comments

Comments
 (0)