Skip to content

Commit 1e2fcb9

Browse files
[ci skip] Reformat all classes
1 parent 5110326 commit 1e2fcb9

File tree

86 files changed

+6899
-6846
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

86 files changed

+6899
-6846
lines changed

.github/FUNDING.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
github: FlorianMichael
2-
custom: ['https://florianmichael.de/donate', 'https://creeper123123321.github.io/#donate']
2+
custom: [ 'https://florianmichael.de/donate', 'https://creeper123123321.github.io/#donate' ]

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: Build
2-
on: [pull_request, push, workflow_dispatch]
2+
on: [ pull_request, push, workflow_dispatch ]
33

44
jobs:
55
build:

README.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,23 @@
11
# ViaRewind
2+
23
[![Latest Release](https://img.shields.io/github/v/release/ViaVersion/ViaRewind)](https://github.com/ViaVersion/ViaRewind/releases)
34
[![Build Status](https://github.com/ViaVersion/ViaRewind/actions/workflows/build.yml/badge.svg?branch=master)](https://github.com/ViaVersion/ViaRewind/actions)
45
[![Discord](https://img.shields.io/badge/chat-on%20discord-blue.svg)](https://viaversion.com/discord)
56

67
**ViaVersion addon to allow 1.8.x and 1.7.x clients on newer server versions.** <br>
78
Runs on 1.9-latest servers or 1.8 clients and lower.
89

9-
**You can override the included version in [ViaFabric](https://modrinth.com/mod/viafabric) or [ViaProxy](https://github.com/ViaVersion/ViaProxy):**
10+
**You can override the included version in [ViaFabric](https://modrinth.com/mod/viafabric)
11+
or [ViaProxy](https://github.com/ViaVersion/ViaProxy):**
12+
1013
- in **ViaFabric**, put ViaRewind into the `mods` folder
1114
- in **ViaProxy**, put ViaRewind into the `jars` folder
1215

13-
Note: when using ViaFabric <= 1.16.5 or J8 ViaProxy builds, you need [J8 ViaRewind](https://ci.viaversion.com/view/ViaRewind/job/ViaRewind-Java8/) builds.
16+
Note: when using ViaFabric <= 1.16.5 or J8 ViaProxy builds, you
17+
need [J8 ViaRewind](https://ci.viaversion.com/view/ViaRewind/job/ViaRewind-Java8/) builds.
1418

15-
**Requires [ViaVersion](https://hangar.papermc.io/ViaVersion/ViaVersion) and [ViaBackwards](https://hangar.papermc.io/ViaVersion/ViaBackwards) to be installed..**
19+
**Requires [ViaVersion](https://hangar.papermc.io/ViaVersion/ViaVersion)
20+
and [ViaBackwards](https://hangar.papermc.io/ViaVersion/ViaBackwards) to be installed..**
1621

1722
Releases/Dev Builds
1823
-

SECURITY.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,14 @@
22

33
## Reporting a Vulnerability
44

5-
If you discover a **security vulnerability**, please **do not** open a public issue. Instead, use one of the following **confidential contact methods**:
5+
If you discover a **security vulnerability**, please **do not** open a public issue. Instead, use one of the following *
6+
*confidential contact methods**:
67

78
* **Email:** [[email protected]](mailto:[email protected])
8-
* **Discord:** Join our [Discord server](https://discord.gg/viaversion) and visit the [#exploit-report](https://discord.com/channels/316206679014244363/1388847764137316485) channel for further instructions.
9+
* **Discord:** Join our [Discord server](https://discord.gg/viaversion) and visit
10+
the [#exploit-report](https://discord.com/channels/316206679014244363/1388847764137316485) channel for further
11+
instructions.
912

10-
If your issue is **not security-related** (e.g., bug reports, feature requests, or usage questions), please use the [GitHub Issues page](https://github.com/ViaVersion/ViaRewind/issues) or contact us via the [Discord server](https://discord.gg/viaversion).
13+
If your issue is **not security-related** (e.g., bug reports, feature requests, or usage questions), please use
14+
the [GitHub Issues page](https://github.com/ViaVersion/ViaRewind/issues) or contact us via
15+
the [Discord server](https://discord.gg/viaversion).

bukkit/src/main/java/com/viaversion/viarewind/BukkitPlugin.java

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,12 @@
1919

2020
import com.viaversion.viarewind.api.ViaRewindPlatform;
2121
import com.viaversion.viaversion.api.Via;
22-
import org.bukkit.plugin.java.JavaPlugin;
23-
2422
import java.io.File;
23+
import org.bukkit.plugin.java.JavaPlugin;
2524

2625
public class BukkitPlugin extends JavaPlugin implements ViaRewindPlatform {
2726

28-
public BukkitPlugin() {
29-
Via.getManager().addEnableListener(() -> this.init(new File(getDataFolder(), "config.yml")));
30-
}
27+
public BukkitPlugin() {
28+
Via.getManager().addEnableListener(() -> this.init(new File(getDataFolder(), "config.yml")));
29+
}
3130
}
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
name: ViaRewind
22
main: com.viaversion.viarewind.BukkitPlugin
3-
authors: [FlorianMichael/EnZaXD, Gerrygames, creeper123123321]
3+
authors: [ FlorianMichael/EnZaXD, Gerrygames, creeper123123321 ]
44
version: ${version}
55
description: ${description}
66
website: https://viaversion.com/rewind
77
api-version: 1.13
88
folia-supported: true
99
load: STARTUP
10-
depend: [ViaVersion, ViaBackwards]
10+
depend: [ ViaVersion, ViaBackwards ]

common/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import de.florianmichael.baseproject.*
1+
import de.florianmichael.baseproject.latestCommitHash
22

33
plugins {
44
id("net.raphimc.class-token-replacer")

common/src/main/java/com/viaversion/viarewind/ViaRewind.java

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -23,21 +23,21 @@
2323

2424
public class ViaRewind {
2525

26-
private static ViaRewindPlatform platform;
27-
private static ViaRewindConfig config;
26+
private static ViaRewindPlatform platform;
27+
private static ViaRewindConfig config;
2828

29-
public static void init(ViaRewindPlatform platform, ViaRewindConfig config) {
30-
Preconditions.checkArgument(ViaRewind.platform == null, "ViaRewind is already initialized");
29+
public static void init(ViaRewindPlatform platform, ViaRewindConfig config) {
30+
Preconditions.checkArgument(ViaRewind.platform == null, "ViaRewind is already initialized");
3131

32-
ViaRewind.platform = platform;
33-
ViaRewind.config = config;
34-
}
32+
ViaRewind.platform = platform;
33+
ViaRewind.config = config;
34+
}
3535

36-
public static ViaRewindPlatform getPlatform() {
37-
return ViaRewind.platform;
38-
}
36+
public static ViaRewindPlatform getPlatform() {
37+
return ViaRewind.platform;
38+
}
3939

40-
public static ViaRewindConfig getConfig() {
41-
return ViaRewind.config;
42-
}
40+
public static ViaRewindConfig getConfig() {
41+
return ViaRewind.config;
42+
}
4343
}

common/src/main/java/com/viaversion/viarewind/ViaRewindConfig.java

Lines changed: 68 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
package com.viaversion.viarewind;
1919

2020
import com.viaversion.viaversion.util.Config;
21-
2221
import java.io.File;
2322
import java.io.InputStream;
2423
import java.net.URL;
@@ -29,105 +28,105 @@
2928

3029
public class ViaRewindConfig extends Config implements com.viaversion.viarewind.api.ViaRewindConfig {
3130

32-
private CooldownIndicator cooldownIndicator;
33-
private boolean replaceAdventureMode;
34-
private boolean replaceParticles;
35-
private int maxBookPages;
36-
private int maxBookPageSize;
37-
private boolean emulateWorldBorder;
38-
private boolean alwaysShowOriginalMobName;
39-
private String worldBorderParticle;
40-
private boolean enableOffhand;
41-
private String offhandCommand;
42-
private boolean emulateLevitationEffect;
43-
private boolean handlePlayerCombatPacket;
31+
private CooldownIndicator cooldownIndicator;
32+
private boolean replaceAdventureMode;
33+
private boolean replaceParticles;
34+
private int maxBookPages;
35+
private int maxBookPageSize;
36+
private boolean emulateWorldBorder;
37+
private boolean alwaysShowOriginalMobName;
38+
private String worldBorderParticle;
39+
private boolean enableOffhand;
40+
private String offhandCommand;
41+
private boolean emulateLevitationEffect;
42+
private boolean handlePlayerCombatPacket;
4443

4544
public ViaRewindConfig(File configFile, Logger logger) {
4645
super(configFile, logger);
4746
}
4847

49-
@Override
50-
public void reload() {
51-
super.reload();
52-
loadFields();
53-
}
54-
55-
private void loadFields() {
56-
cooldownIndicator = CooldownIndicator.valueOf(getString("cooldown-indicator", "TITLE").toUpperCase());
57-
replaceAdventureMode = getBoolean("replace-adventure", false);
58-
replaceParticles = getBoolean("replace-particles", false);
59-
maxBookPages = getInt("max-book-pages", 100);
60-
maxBookPageSize = getInt("max-book-page-length", 5000);
61-
emulateWorldBorder = getBoolean("emulate-world-border", true);
62-
alwaysShowOriginalMobName = getBoolean("always-show-original-mob-name", true);
63-
worldBorderParticle = getString("world-border-particle", "fireworksSpark");
64-
enableOffhand = getBoolean("enable-offhand", true);
65-
offhandCommand = getString("offhand-command", "/offhand");
66-
emulateLevitationEffect = getBoolean("emulate-levitation-effect", true);
67-
handlePlayerCombatPacket = getBoolean("handle-player-combat-packet", true);
68-
}
69-
70-
@Override
48+
@Override
49+
public void reload() {
50+
super.reload();
51+
loadFields();
52+
}
53+
54+
private void loadFields() {
55+
cooldownIndicator = CooldownIndicator.valueOf(getString("cooldown-indicator", "TITLE").toUpperCase());
56+
replaceAdventureMode = getBoolean("replace-adventure", false);
57+
replaceParticles = getBoolean("replace-particles", false);
58+
maxBookPages = getInt("max-book-pages", 100);
59+
maxBookPageSize = getInt("max-book-page-length", 5000);
60+
emulateWorldBorder = getBoolean("emulate-world-border", true);
61+
alwaysShowOriginalMobName = getBoolean("always-show-original-mob-name", true);
62+
worldBorderParticle = getString("world-border-particle", "fireworksSpark");
63+
enableOffhand = getBoolean("enable-offhand", true);
64+
offhandCommand = getString("offhand-command", "/offhand");
65+
emulateLevitationEffect = getBoolean("emulate-levitation-effect", true);
66+
handlePlayerCombatPacket = getBoolean("handle-player-combat-packet", true);
67+
}
68+
69+
@Override
7170
public CooldownIndicator getCooldownIndicator() {
72-
return cooldownIndicator;
71+
return cooldownIndicator;
7372
}
7473

7574
@Override
7675
public boolean isReplaceAdventureMode() {
77-
return replaceAdventureMode;
76+
return replaceAdventureMode;
7877
}
7978

8079
@Override
8180
public boolean isReplaceParticles() {
82-
return replaceParticles;
81+
return replaceParticles;
8382
}
8483

8584
@Override
8685
public int getMaxBookPages() {
87-
return maxBookPages;
86+
return maxBookPages;
8887
}
8988

9089
@Override
9190
public int getMaxBookPageSize() {
92-
return maxBookPageSize;
91+
return maxBookPageSize;
9392
}
9493

95-
@Override
96-
public boolean isEmulateWorldBorder() {
97-
return emulateWorldBorder;
98-
}
94+
@Override
95+
public boolean isEmulateWorldBorder() {
96+
return emulateWorldBorder;
97+
}
9998

100-
@Override
101-
public boolean alwaysShowOriginalMobName() {
102-
return alwaysShowOriginalMobName;
103-
}
99+
@Override
100+
public boolean alwaysShowOriginalMobName() {
101+
return alwaysShowOriginalMobName;
102+
}
104103

105-
@Override
106-
public String getWorldBorderParticle() {
107-
return worldBorderParticle;
108-
}
104+
@Override
105+
public String getWorldBorderParticle() {
106+
return worldBorderParticle;
107+
}
109108

110-
@Override
111-
public boolean isEnableOffhand() {
112-
return enableOffhand;
113-
}
109+
@Override
110+
public boolean isEnableOffhand() {
111+
return enableOffhand;
112+
}
114113

115-
@Override
116-
public String getOffhandCommand() {
117-
return offhandCommand;
118-
}
114+
@Override
115+
public String getOffhandCommand() {
116+
return offhandCommand;
117+
}
119118

120-
@Override
121-
public boolean emulateLevitationEffect() {
122-
return emulateLevitationEffect;
123-
}
119+
@Override
120+
public boolean emulateLevitationEffect() {
121+
return emulateLevitationEffect;
122+
}
124123

125-
@Override
126-
public boolean handlePlayerCombatPacket() {
127-
return handlePlayerCombatPacket;
128-
}
124+
@Override
125+
public boolean handlePlayerCombatPacket() {
126+
return handlePlayerCombatPacket;
127+
}
129128

130-
@Override
129+
@Override
131130
public URL getDefaultConfigURL() {
132131
return getClass().getClassLoader().getResource("assets/viarewind/config.yml");
133132
}

0 commit comments

Comments
 (0)