This repository was archived by the owner on Sep 19, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 5 files changed +30
-15
lines changed
src/main/java/com/danifoldi/bungeegui Expand file tree Collapse file tree 5 files changed +30
-15
lines changed Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ plugins {
4
4
}
5
5
6
6
group ' com.danifoldi'
7
- version ' 1.2.2 '
7
+ version ' 1.2.4 '
8
8
sourceCompatibility = JavaVersion . VERSION_11
9
9
10
10
repositories {
@@ -28,11 +28,10 @@ dependencies {
28
28
exclude module : ' snakeyaml'
29
29
}
30
30
31
- implementation ' org.jetbrains:annotations:20.1.0'
31
+ compileOnly ' org.jetbrains:annotations:20.1.0'
32
32
implementation ' javax.inject:javax.inject:1'
33
33
implementation ' com.google.dagger:dagger:2.37'
34
34
annotationProcessor ' com.google.dagger:dagger-compiler:2.37'
35
-
36
35
}
37
36
38
37
processResources {
@@ -50,5 +49,7 @@ shadowJar {
50
49
relocate ' org.jetbrains.annotations' , ' com.danifoldi.bungeegui.lib.annotations'
51
50
relocate ' javax.inject' , ' com.danifoldi.bungeegui.lib.inject'
52
51
relocate ' dagger' , ' com.danifoldi.bungeegui.lib.dagger'
52
+ relocate ' com.electronwill.night-config' , ' com.danifoldi.bungeegui.lib.nightconfig'
53
+
53
54
archiveFileName. set(" ${ project.name} -${ project.version} .jar" )
54
55
}
Original file line number Diff line number Diff line change 9
9
import java .util .stream .Collectors ;
10
10
11
11
public class GuiGrid {
12
- private final Map <Integer , GuiItem > items ;
12
+ private final @ NotNull Map <Integer , GuiItem > items ;
13
13
private final boolean isTargeted ;
14
- private final List <String > commandAliases ;
15
- private final String permission ;
14
+ private final @ NotNull List <String > commandAliases ;
15
+ private final @ NotNull String permission ;
16
16
private final int guiSize ;
17
- private final String title ;
17
+ private final @ NotNull String title ;
18
18
private final boolean selfTarget ;
19
19
private final boolean ignoreVanished ;
20
20
private final boolean requireOnlineTarget ;
21
- private final List <String > whitelistServers ;
22
- private final List <String > blacklistServers ;
21
+ private final @ NotNull List <String > whitelistServers ;
22
+ private final @ NotNull List <String > blacklistServers ;
23
23
private final boolean placeholdersTarget ;
24
24
private final @ Nullable GuiSound openSound ;
25
25
private final boolean targetBypass ;
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ public class GuiItem {
14
14
private final int amount ;
15
15
private final @ NotNull String name ;
16
16
private final @ NotNull List <String > lore ;
17
- private final String data ;
17
+ private final @ NotNull String data ;
18
18
private final @ NotNull List <String > commands ;
19
19
private final boolean enchanted ;
20
20
private final @ Nullable GuiSound clickSound ;
Original file line number Diff line number Diff line change 4
4
import net .md_5 .bungee .api .ProxyServer ;
5
5
import net .md_5 .bungee .api .connection .ProxiedPlayer ;
6
6
import net .md_5 .bungee .api .plugin .Plugin ;
7
+ import org .jetbrains .annotations .NotNull ;
8
+ import org .jetbrains .annotations .Nullable ;
7
9
8
10
public class VanishUtil {
9
- public static boolean isVanished (ProxiedPlayer player ) {
10
- Plugin premiumvanishPlugin = ProxyServer .getInstance ().getPluginManager ().getPlugin ("PremiumVanish" );
11
+ public static boolean isVanished (final @ NotNull ProxiedPlayer player ) {
12
+ final @ Nullable Plugin premiumvanishPlugin = ProxyServer .getInstance ().getPluginManager ().getPlugin ("PremiumVanish" );
11
13
if (premiumvanishPlugin == null ) {
12
14
return false ;
13
15
}
Original file line number Diff line number Diff line change 1
1
package com .danifoldi .bungeegui .util ;
2
2
3
+ import org .jetbrains .annotations .NotNull ;
4
+
3
5
import java .util .Arrays ;
4
6
5
7
public enum VersionUtil {
6
8
UNKNOWN (999 ),
9
+ v1_17 (755 ),
7
10
v1_16_5 (754 ),
8
11
v1_16_4 (754 ),
9
12
v1_16_3 (753 ),
@@ -35,6 +38,15 @@ public enum VersionUtil {
35
38
v1_9_2 (109 ),
36
39
v1_9_1 (108 ),
37
40
v1_9 (107 ),
41
+ v1_8_9 (47 ),
42
+ v1_8_8 (47 ),
43
+ v1_8_7 (47 ),
44
+ v1_8_6 (47 ),
45
+ v1_8_5 (47 ),
46
+ v1_8_4 (47 ),
47
+ v1_8_3 (47 ),
48
+ v1_8_2 (47 ),
49
+ v1_8_1 (47 ),
38
50
v1_8 (47 ),
39
51
v1_7_10 (5 ),
40
52
v1_7_9 (5 ),
@@ -55,15 +67,15 @@ public enum VersionUtil {
55
67
56
68
private final int protocolVersion ;
57
69
58
- VersionUtil (int protocolVersion ) {
70
+ VersionUtil (final int protocolVersion ) {
59
71
this .protocolVersion = protocolVersion ;
60
72
}
61
73
62
- public static VersionUtil find (int protocolVersion ) {
74
+ public static @ NotNull VersionUtil find (final int protocolVersion ) {
63
75
return Arrays .stream (VersionUtil .values ()).filter (p -> p .protocolVersion == protocolVersion ).findFirst ().orElse (UNKNOWN );
64
76
}
65
77
66
- public String getVersion () {
78
+ public @ NotNull String getVersion () {
67
79
for (VersionUtil version : VersionUtil .values ()) {
68
80
if (version .protocolVersion == protocolVersion ) {
69
81
return version .toString ().replace ("v" , "" ).replace ("_" , "." );
You can’t perform that action at this time.
0 commit comments