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

Commit b235dcd

Browse files
Add code
1 parent c7bd3af commit b235dcd

File tree

5 files changed

+225
-0
lines changed

5 files changed

+225
-0
lines changed

.github/workflows/build.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Automatically build the project and run any configured tests for every push
2+
# and submitted pull request. This can help catch issues that only occur on
3+
# certain platforms or Java versions, and provides a first line of defence
4+
# against bad commits.
5+
6+
name: ViaErrorHandler CI
7+
8+
on: [pull_request, push, workflow_dispatch]
9+
10+
jobs:
11+
build:
12+
runs-on: ubuntu-22.04
13+
steps:
14+
- name: Checkout Repository
15+
uses: actions/checkout@v4
16+
- name: Set up JDK 21
17+
uses: actions/setup-java@v4
18+
with:
19+
distribution: 'temurin'
20+
java-version: 21
21+
check-latest: true
22+
- name: Build with Maven
23+
run: mvn install
24+
- name: Upload Artifacts to GitHub
25+
uses: actions/upload-artifact@v4
26+
with:
27+
name: Artifacts
28+
path: target

.gitignore

Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
### Java files ###
2+
*.class
3+
4+
# Package Files
5+
#*.jar
6+
*.war
7+
*.ear
8+
9+
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
10+
hs_err_pid*
11+
12+
13+
14+
### Intellij ###
15+
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm
16+
# Ignore project files
17+
*.iml
18+
19+
# Ignore IDEA directory
20+
.idea/*
21+
22+
# Include the project's dictionary
23+
!.idea/dictionaries/
24+
!.idea/dictionaries/*
25+
26+
# File-based project format:
27+
*.ipr
28+
*.iws
29+
30+
### Plugin-specific files: ###
31+
# IntelliJ
32+
/out/
33+
34+
# mpeltonen/sbt-idea plugin
35+
.idea_modules/
36+
37+
# JIRA plugin
38+
atlassian-ide-plugin.xml
39+
40+
# Crashlytics plugin (for Android Studio and IntelliJ)
41+
com_crashlytics_export_strings.xml
42+
crashlytics.properties
43+
crashlytics-build.properties
44+
45+
46+
47+
### Eclipse ###
48+
*.pydevproject
49+
.metadata
50+
.gradle
51+
bin/
52+
tmp/
53+
*.tmp
54+
*.bak
55+
*.swp
56+
*~.nib
57+
local.properties
58+
.settings/
59+
.loadpath
60+
61+
# Eclipse Core
62+
.project
63+
64+
# External tool builders
65+
.externalToolBuilders/
66+
67+
# Locally stored "Eclipse launch configurations"
68+
*.launch
69+
70+
# CDT-specific
71+
.cproject
72+
73+
# JDT-specific (Eclipse Java Development Tools)
74+
.classpath
75+
76+
# PDT-specific
77+
.buildpath
78+
79+
# sbteclipse plugin
80+
.target
81+
82+
# TeXlipse plugin
83+
.texlipse
84+
85+
86+
87+
### Maven ###
88+
target/
89+
pom.xml.tag
90+
pom.xml.releaseBackup
91+
pom.xml.versionsBackup
92+
pom.xml.next
93+
release.properties
94+
dependency-reduced-pom.xml
95+
buildNumber.properties
96+
97+
98+
99+
### NetBeans ###
100+
nbproject/private/
101+
build/
102+
nbbuild/
103+
dist/
104+
nbdist/
105+
nbactions.xml
106+
nb-configuration.xml
107+
.nb-gradle/
108+
109+
110+
111+
### Git ###
112+
# Don't exclude the .gitignore itself
113+
!/.gitignore

pom.xml

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
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+
<modelVersion>4.0.0</modelVersion>
6+
7+
<groupId>de.florianmichael</groupId>
8+
<artifactId>ViaErrorHandler</artifactId>
9+
<version>1.0.0</version>
10+
<packaging>jar</packaging>
11+
12+
<properties>
13+
<!-- Project Properties -->
14+
<projectEncoding>UTF-8</projectEncoding>
15+
<project.build.sourceEncoding>${projectEncoding}</project.build.sourceEncoding>
16+
<project.build.outputEncoding>${projectEncoding}</project.build.outputEncoding>
17+
<maven.compiler.source>1.8</maven.compiler.source>
18+
<maven.compiler.target>1.8</maven.compiler.target>
19+
</properties>
20+
21+
<repositories>
22+
<repository>
23+
<id>viaversion-repo</id>
24+
<url>https://repo.viaversion.com</url>
25+
</repository>
26+
<repository>
27+
<id>spigot-repo</id>
28+
<url>https://hub.spigotmc.org/nexus/content/repositories/snapshots/</url>
29+
</repository>
30+
</repositories>
31+
32+
<dependencies>
33+
<!-- ViaVersion -->
34+
<dependency>
35+
<groupId>com.viaversion</groupId>
36+
<artifactId>viaversion-api</artifactId>
37+
<version>4.6.2</version>
38+
<scope>provided</scope>
39+
</dependency>
40+
41+
<!-- Spigot API -->
42+
<dependency>
43+
<groupId>org.spigotmc</groupId>
44+
<artifactId>spigot-api</artifactId>
45+
<version>1.16.5-R0.1-SNAPSHOT</version>
46+
<scope>provided</scope>
47+
</dependency>
48+
</dependencies>
49+
50+
<build>
51+
<resources>
52+
<resource>
53+
<targetPath>.</targetPath>
54+
<filtering>true</filtering>
55+
<directory>src/main/resources/</directory>
56+
<includes>
57+
<include>*</include>
58+
</includes>
59+
</resource>
60+
</resources>
61+
</build>
62+
</project>
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
package de.florianmichael.viaerrorhandler;
2+
3+
import org.bukkit.plugin.java.JavaPlugin;
4+
5+
public class ViaErrorHandler extends JavaPlugin {
6+
7+
@Override
8+
public void onLoad() {
9+
System.setProperty("viaversion.strict-error-handling1_20_5", "false");
10+
getLogger().info("ViaVersion strict error handling disabled for 1.20.5 players!");
11+
}
12+
13+
}

src/main/resources/plugin.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
name: ViaErrorHandler
2+
version: ${project.version}
3+
main: de.florianmichael.viaerrorhandler.ViaErrorHandler
4+
api-version: 1.13
5+
6+
authors: [FlorianMichael/EnZaXD]
7+
website: https://github.com/FlorianMichael
8+
9+
loadbefore: [ViaVersion]

0 commit comments

Comments
 (0)