Skip to content

Commit e87b2a7

Browse files
author
Jerome van den Wyenbergh
committed
Initial commit
0 parents  commit e87b2a7

File tree

35 files changed

+1780
-0
lines changed

35 files changed

+1780
-0
lines changed

.gitignore

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Compiled class file
2+
*.class
3+
4+
# Log file
5+
*.log
6+
7+
# Intellij files
8+
*.iml
9+
10+
# Package Files
11+
*.jar
12+
*.war
13+
*.nar
14+
*.ear
15+
*.zip
16+
*.tar.gz
17+
*.rar
18+
19+
# Directories
20+
.idea
21+
target
22+
23+
# maven files
24+
dependency-reduced-pom.xml

CODE_OF_CONDUCT.md

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
# Contributor Covenant Code of Conduct
2+
3+
## Our Pledge
4+
5+
In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making
6+
participation in our project and our community a harassment-free experience for everyone, regardless of age, body size,
7+
disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education,
8+
socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.
9+
10+
## Our Standards
11+
12+
Examples of behavior that contributes to creating a positive environment include:
13+
14+
* Using welcoming and inclusive language
15+
* Being respectful of differing viewpoints and experiences
16+
* Gracefully accepting constructive criticism
17+
* Focusing on what is best for the community
18+
* Showing empathy towards other community members
19+
20+
Examples of unacceptable behavior by participants include:
21+
22+
* The use of sexualized language or imagery and unwelcome sexual attention or advances
23+
* Trolling, insulting/derogatory comments, and personal or political attacks
24+
* Public or private harassment
25+
* Publishing others' private information, such as a physical or electronic address, without explicit permission
26+
* Other conduct which could reasonably be considered inappropriate in a professional setting
27+
28+
## Our Responsibilities
29+
30+
Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take
31+
appropriate and fair corrective action in response to any instances of unacceptable behavior.
32+
33+
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits,
34+
issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any
35+
contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
36+
37+
## Scope
38+
39+
This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the
40+
project or its community. Examples of representing a project or community include using an official project e-mail
41+
address, posting via an official social media account, or acting as an appointed representative at an online or offline
42+
event. Representation of a project may be further defined and clarified by project maintainers.
43+
44+
## Enforcement
45+
46+
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at
47+
admin@minecode.dev. All complaints will be reviewed and investigated and will result in a response that is deemed
48+
necessary and appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to
49+
the reporter of an incident. Further details of specific enforcement policies may be posted separately.
50+
51+
Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent
52+
repercussions as determined by other members of the project's leadership.
53+
54+
## Attribution
55+
56+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available
57+
at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
58+
59+
[homepage]: https://www.contributor-covenant.org
60+
61+
For answers to common questions about this code of conduct, see
62+
https://www.contributor-covenant.org/faq

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) 2021 MineCode
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.

api/pom.xml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xmlns="http://maven.apache.org/POM/4.0.0"
4+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
5+
<parent>
6+
<artifactId>parent</artifactId>
7+
<groupId>dev.minecode.language</groupId>
8+
<version>0.1.0-Pre.1</version>
9+
</parent>
10+
<modelVersion>4.0.0</modelVersion>
11+
12+
<artifactId>api</artifactId>
13+
14+
<dependencies>
15+
<!-- MineCode Core -->
16+
<dependency>
17+
<groupId>dev.minecode.core</groupId>
18+
<artifactId>api</artifactId>
19+
<version>0.1.0-Pre.32</version>
20+
<exclusions>
21+
<exclusion>
22+
<groupId>com.google.code.gson</groupId>
23+
<artifactId>gson</artifactId>
24+
</exclusion>
25+
</exclusions>
26+
</dependency>
27+
</dependencies>
28+
29+
<build>
30+
<plugins>
31+
<plugin>
32+
<groupId>org.apache.maven.plugins</groupId>
33+
<artifactId>maven-compiler-plugin</artifactId>
34+
<version>3.8.1</version>
35+
<configuration>
36+
<source>8</source>
37+
<target>8</target>
38+
</configuration>
39+
</plugin>
40+
</plugins>
41+
</build>
42+
43+
<properties>
44+
<maven.compiler.source>8</maven.compiler.source>
45+
<maven.compiler.target>8</maven.compiler.target>
46+
</properties>
47+
48+
</project>
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
package dev.minecode.language.api;
2+
3+
import dev.minecode.core.api.CoreAPI;
4+
import dev.minecode.language.api.manager.FileManager;
5+
6+
public abstract class LanguageAPI {
7+
8+
// Instance
9+
private static LanguageAPI instance;
10+
11+
public static LanguageAPI getInstance() {
12+
return instance;
13+
}
14+
15+
public static void setInstance(LanguageAPI instance) {
16+
LanguageAPI.instance = instance;
17+
}
18+
19+
20+
// CoreAPI
21+
private static CoreAPI getCoreAPI() {
22+
return CoreAPI.getInstance();
23+
}
24+
25+
26+
// Manager
27+
public abstract FileManager getFileManager();
28+
29+
30+
// Variables
31+
public abstract boolean isUsingGUI();
32+
33+
public abstract boolean isForceOpenInventory();
34+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
package dev.minecode.language.api.manager;
2+
3+
import dev.minecode.core.api.object.FileObject;
4+
5+
public interface FileManager {
6+
7+
FileObject getConfig();
8+
9+
}

bungeecord/pom.xml

Lines changed: 125 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,125 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xmlns="http://maven.apache.org/POM/4.0.0"
4+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
5+
<parent>
6+
<artifactId>parent</artifactId>
7+
<groupId>dev.minecode.language</groupId>
8+
<version>0.1.0-Pre.1</version>
9+
</parent>
10+
<modelVersion>4.0.0</modelVersion>
11+
12+
<artifactId>bungeecord</artifactId>
13+
14+
<dependencies>
15+
<!-- MineCode Language -->
16+
<dependency>
17+
<groupId>dev.minecode.language</groupId>
18+
<artifactId>common</artifactId>
19+
<version>0.1.0-Pre.1</version>
20+
<exclusions>
21+
<exclusion>
22+
<groupId>net.md-5</groupId>
23+
<artifactId>bungeecord-chat</artifactId>
24+
</exclusion>
25+
</exclusions>
26+
</dependency>
27+
28+
<!-- MineCode Core -->
29+
<dependency>
30+
<groupId>dev.minecode.core</groupId>
31+
<artifactId>bungeecord</artifactId>
32+
<version>0.1.0-Pre.32</version>
33+
</dependency>
34+
35+
<!-- BungeeCord -->
36+
<dependency>
37+
<groupId>net.md-5</groupId>
38+
<artifactId>bungeecord-api</artifactId>
39+
<version>1.16-R0.4-SNAPSHOT</version>
40+
<type>jar</type>
41+
<scope>provided</scope>
42+
<exclusions>
43+
<exclusion>
44+
<groupId>org.yaml</groupId>
45+
<artifactId>snakeyaml</artifactId>
46+
</exclusion>
47+
</exclusions>
48+
</dependency>
49+
</dependencies>
50+
51+
<build>
52+
<plugins>
53+
<plugin>
54+
<groupId>org.apache.maven.plugins</groupId>
55+
<artifactId>maven-compiler-plugin</artifactId>
56+
<version>3.8.1</version>
57+
<configuration>
58+
<source>8</source>
59+
<target>8</target>
60+
</configuration>
61+
</plugin>
62+
<plugin>
63+
<groupId>org.apache.maven.plugins</groupId>
64+
<artifactId>maven-shade-plugin</artifactId>
65+
<version>3.2.4</version>
66+
<executions>
67+
<execution>
68+
<phase>package</phase>
69+
<goals>
70+
<goal>shade</goal>
71+
</goals>
72+
<configuration>
73+
<artifactSet>
74+
<includes>
75+
<include>dev.minecode.language:api</include>
76+
<include>dev.minecode.language:common</include>
77+
78+
<include>dev.minecode.core:api</include>
79+
<include>dev.minecode.core:common</include>
80+
<include>dev.minecode.core:bungeecord</include>
81+
82+
<include>org.spongepowered:configurate-core</include>
83+
<include>io.leangen.geantyref:geantyref</include>
84+
<include>org.checkerframework:checkerframework</include>
85+
86+
<include>org.spongepowered:configurate-yaml</include>
87+
<include>org.yaml:snakeyaml</include>
88+
89+
<include>org.spongepowered:configurate-gson</include>
90+
<include>com.google.code.gson:gson</include>
91+
</includes>
92+
</artifactSet>
93+
<relocations>
94+
<relocation>
95+
<pattern>dev.minecode.core</pattern>
96+
<shadedPattern>dev.minecode.language.shade.core</shadedPattern>
97+
</relocation>
98+
<relocation>
99+
<pattern>org.yaml</pattern>
100+
<shadedPattern>dev.minecode.language.shade.yaml</shadedPattern>
101+
</relocation>
102+
</relocations>
103+
<filters>
104+
<filter>
105+
<artifact>*:*</artifact>
106+
<excludes>
107+
<exclude>META-INF/*.SF</exclude>
108+
<exclude>META-INF/*.DSA</exclude>
109+
<exclude>META-INF/*.RSA</exclude>
110+
</excludes>
111+
</filter>
112+
</filters>
113+
</configuration>
114+
</execution>
115+
</executions>
116+
</plugin>
117+
</plugins>
118+
</build>
119+
120+
<properties>
121+
<maven.compiler.source>8</maven.compiler.source>
122+
<maven.compiler.target>8</maven.compiler.target>
123+
</properties>
124+
125+
</project>
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
package dev.minecode.language.bungeecord;
2+
3+
import dev.minecode.core.bungeecord.CoreBungeeCord;
4+
import dev.minecode.language.bungeecord.command.LanguageCommand;
5+
import dev.minecode.language.bungeecord.listener.PlayerListener;
6+
import dev.minecode.language.common.LanguageCommon;
7+
import net.md_5.bungee.api.plugin.Plugin;
8+
9+
public class LanguageBungeeCord extends Plugin {
10+
private static LanguageBungeeCord instance;
11+
12+
private CoreBungeeCord coreBungeeCord;
13+
private LanguageCommon languageCommon;
14+
15+
public static LanguageBungeeCord getInstance() {
16+
return instance;
17+
}
18+
19+
@Override
20+
public void onEnable() {
21+
makeInstances();
22+
registerCommands();
23+
registerListeners();
24+
registerChannels();
25+
}
26+
27+
private void makeInstances() {
28+
instance = this;
29+
coreBungeeCord = new CoreBungeeCord(this);
30+
languageCommon = new LanguageCommon();
31+
}
32+
33+
public void onDisable() {
34+
CoreBungeeCord.getInstance().onDisable();
35+
}
36+
37+
private void registerCommands() {
38+
getProxy().getPluginManager().registerCommand(this, new LanguageCommand("language"));
39+
}
40+
41+
private void registerListeners() {
42+
new PlayerListener();
43+
}
44+
45+
private void registerChannels() {
46+
getProxy().registerChannel("MineCode");
47+
}
48+
}

0 commit comments

Comments
 (0)