Skip to content

Commit 3d0263c

Browse files
committed
first commit
0 parents  commit 3d0263c

17 files changed

Lines changed: 1267 additions & 0 deletions

File tree

.github/dependabot.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# To get started with Dependabot version updates, you'll need to specify which
2+
# package ecosystems to update and where the package manifests are located.
3+
# Please see the documentation for all configuration options:
4+
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
5+
6+
version: 2
7+
updates:
8+
- package-ecosystem: "maven" # See documentation for possible values
9+
directory: "/" # Location of package manifests
10+
schedule:
11+
interval: "daily"

.github/workflows/maven.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time
2+
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-maven
3+
4+
# This workflow uses actions that are not certified by GitHub.
5+
# They are provided by a third-party and are governed by
6+
# separate terms of service, privacy policy, and support
7+
# documentation.
8+
9+
name: Java CI with Maven
10+
11+
on:
12+
push:
13+
branches: [ "main" ]
14+
pull_request:
15+
branches: [ "main" ]
16+
17+
jobs:
18+
build:
19+
20+
runs-on: ubuntu-latest
21+
22+
steps:
23+
- uses: actions/checkout@v3
24+
- name: Set up JDK 17
25+
uses: actions/setup-java@v3
26+
with:
27+
java-version: '17'
28+
distribution: 'temurin'
29+
cache: maven
30+
- name: Build with Maven
31+
run: mvn -B package --file pom.xml

.gitignore

Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
# User-specific stuff
2+
.idea/
3+
4+
*.iml
5+
*.ipr
6+
*.iws
7+
8+
# IntelliJ
9+
out/
10+
11+
# Compiled class file
12+
*.class
13+
14+
# Log file
15+
*.log
16+
17+
# BlueJ files
18+
*.ctxt
19+
20+
# Package Files #
21+
*.jar
22+
*.war
23+
*.nar
24+
*.ear
25+
*.zip
26+
*.tar.gz
27+
*.rar
28+
29+
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
30+
hs_err_pid*
31+
32+
*~
33+
34+
# temporary files which can be created if a process still has a handle open of a deleted file
35+
.fuse_hidden*
36+
37+
# KDE directory preferences
38+
.directory
39+
40+
# Linux trash folder which might appear on any partition or disk
41+
.Trash-*
42+
43+
# .nfs files are created when an open file is removed but is still being accessed
44+
.nfs*
45+
46+
# General
47+
.DS_Store
48+
.AppleDouble
49+
.LSOverride
50+
51+
# Icon must end with two \r
52+
Icon
53+
54+
# Thumbnails
55+
._*
56+
57+
# Files that might appear in the root of a volume
58+
.DocumentRevisions-V100
59+
.fseventsd
60+
.Spotlight-V100
61+
.TemporaryItems
62+
.Trashes
63+
.VolumeIcon.icns
64+
.com.apple.timemachine.donotpresent
65+
66+
# Directories potentially created on remote AFP share
67+
.AppleDB
68+
.AppleDesktop
69+
Network Trash Folder
70+
Temporary Items
71+
.apdisk
72+
73+
# Windows thumbnail cache files
74+
Thumbs.db
75+
Thumbs.db:encryptable
76+
ehthumbs.db
77+
ehthumbs_vista.db
78+
79+
# Dump file
80+
*.stackdump
81+
82+
# Folder config file
83+
[Dd]esktop.ini
84+
85+
# Recycle Bin used on file shares
86+
$RECYCLE.BIN/
87+
88+
# Windows Installer files
89+
*.cab
90+
*.msi
91+
*.msix
92+
*.msm
93+
*.msp
94+
95+
# Windows shortcuts
96+
*.lnk
97+
98+
target/
99+
100+
pom.xml.tag
101+
pom.xml.releaseBackup
102+
pom.xml.versionsBackup
103+
pom.xml.next
104+
105+
release.properties
106+
dependency-reduced-pom.xml
107+
buildNumber.properties
108+
.mvn/timing.properties
109+
.mvn/wrapper/maven-wrapper.jar
110+
.flattened-pom.xml
111+
112+
# Common working directory
113+
run/
114+
src/main/resources/temp.txt

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2023 Negative Games
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

pom.xml

Lines changed: 150 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,150 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xmlns="http://maven.apache.org/POM/4.0.0"
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
5+
<modelVersion>4.0.0</modelVersion>
6+
7+
<groupId>fun.supersmp</groupId>
8+
<artifactId>CodeLock</artifactId>
9+
<version>1.0-SNAPSHOT</version>
10+
<packaging>jar</packaging>
11+
12+
<properties>
13+
<maven.compiler.source>17</maven.compiler.source>
14+
<maven.compiler.target>17</maven.compiler.target>
15+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
16+
</properties>
17+
18+
<!-- Build Script -->
19+
<build>
20+
<finalName>CodeLock</finalName>
21+
22+
<plugins>
23+
<!-- Maven Compiler -->
24+
<plugin>
25+
<groupId>org.apache.maven.plugins</groupId>
26+
<artifactId>maven-compiler-plugin</artifactId>
27+
<version>3.12.1</version>
28+
</plugin>
29+
30+
<!-- Maven Shade -->
31+
<plugin>
32+
<groupId>org.apache.maven.plugins</groupId>
33+
<artifactId>maven-shade-plugin</artifactId>
34+
<version>3.5.2</version>
35+
<executions>
36+
<execution>
37+
<phase>package</phase>
38+
<goals>
39+
<goal>shade</goal>
40+
</goals>
41+
<configuration>
42+
<createDependencyReducedPom>false</createDependencyReducedPom>
43+
</configuration>
44+
</execution>
45+
</executions>
46+
<configuration>
47+
<relocations>
48+
<relocation>
49+
<pattern>games.negative.alumina</pattern>
50+
<shadedPattern>fun.supersmp.codelock.libs.alumina</shadedPattern>
51+
</relocation>
52+
<!-- <relocation>-->
53+
<!-- <pattern>de.exlll.configlib</pattern>-->
54+
<!-- <shadedPattern>fun.supersmp.codelock.libs.config</shadedPattern>-->
55+
<!-- </relocation>-->
56+
</relocations>
57+
</configuration>
58+
</plugin>
59+
</plugins>
60+
<resources>
61+
<resource>
62+
<directory>src/main/resources</directory>
63+
<filtering>true</filtering>
64+
</resource>
65+
</resources>
66+
</build>
67+
68+
<repositories>
69+
<!-- Negative Games -->
70+
<repository>
71+
<id>Negative Games</id>
72+
<url>https://repo.negative.games/repository/maven-releases/</url>
73+
</repository>
74+
75+
<!-- PaperMC -->
76+
<repository>
77+
<id>papermc-repo</id>
78+
<url>https://repo.papermc.io/repository/maven-public/</url>
79+
</repository>
80+
81+
<!-- Jitpack -->
82+
<repository>
83+
<id>jitpack.io</id>
84+
<url>https://jitpack.io</url>
85+
</repository>
86+
87+
<!-- Open Collaboration -->
88+
<repository>
89+
<id>opencollab-repository-maven-snapshots</id>
90+
<name>Opencollab Repository</name>
91+
<url>https://repo.opencollab.dev/maven-snapshots</url>
92+
</repository>
93+
94+
<!-- PlaceholderAPI -->
95+
<repository>
96+
<id>placeholderapi</id>
97+
<url>https://repo.extendedclip.com/content/repositories/placeholderapi/</url>
98+
</repository>
99+
</repositories>
100+
101+
<dependencies>
102+
<!-- Paper API -->
103+
<dependency>
104+
<groupId>io.papermc.paper</groupId>
105+
<artifactId>paper-api</artifactId>
106+
<version>1.20.4-R0.1-SNAPSHOT</version>
107+
<scope>provided</scope>
108+
</dependency>
109+
110+
<!-- Alumina -->
111+
<dependency>
112+
<groupId>games.negative.alumina</groupId>
113+
<artifactId>alumina</artifactId>
114+
<version>1.5.2</version>
115+
<scope>compile</scope>
116+
</dependency>
117+
118+
<!-- Jetbrains Annotations -->
119+
<dependency>
120+
<groupId>org.jetbrains</groupId>
121+
<artifactId>annotations</artifactId>
122+
<version>24.1.0</version>
123+
<scope>provided</scope>
124+
</dependency>
125+
126+
<!-- Lombok -->
127+
<dependency>
128+
<groupId>org.projectlombok</groupId>
129+
<artifactId>lombok</artifactId>
130+
<version>1.18.30</version>
131+
<scope>provided</scope>
132+
</dependency>
133+
134+
<!-- ConfigLib -->
135+
<!-- <dependency>-->
136+
<!-- <groupId>de.exlll</groupId>-->
137+
<!-- <artifactId>configlib-yaml</artifactId>-->
138+
<!-- <version>4.5.0</version>-->
139+
<!-- <scope>compile</scope>-->
140+
<!-- </dependency>-->
141+
142+
<!-- PlaceholderAPI -->
143+
<dependency>
144+
<groupId>me.clip</groupId>
145+
<artifactId>placeholderapi</artifactId>
146+
<version>2.11.5</version>
147+
<scope>provided</scope>
148+
</dependency>
149+
</dependencies>
150+
</project>
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
package fun.supersmp.codelock;
2+
3+
import fun.supersmp.codelock.command.CommandCodeLockBlock;
4+
import fun.supersmp.codelock.core.Locale;
5+
import fun.supersmp.codelock.listener.PlayerListener;
6+
import games.negative.alumina.AluminaPlugin;
7+
import lombok.SneakyThrows;
8+
import org.jetbrains.annotations.NotNull;
9+
10+
public class CodeLockPlugin extends AluminaPlugin {
11+
12+
private static CodeLockPlugin instance;
13+
14+
@Override
15+
public void load() {
16+
instance = this;
17+
}
18+
19+
@SneakyThrows
20+
@Override
21+
public void enable() {
22+
Locale.init(this);
23+
24+
registerCommand(new CommandCodeLockBlock());
25+
registerListeners(new PlayerListener());
26+
}
27+
28+
@Override
29+
public void disable() {
30+
31+
}
32+
33+
@NotNull
34+
public static CodeLockPlugin instance() {
35+
return instance;
36+
}
37+
38+
}

0 commit comments

Comments
 (0)