File tree Expand file tree Collapse file tree
src/main/java/dev/lrxh/neptune/game/arena Expand file tree Collapse file tree Original file line number Diff line number Diff line change 66
77 <groupId >me.dev.lrxh</groupId >
88 <artifactId >API</artifactId >
9- <version >2.4 </version >
9+ <version >2.5 </version >
1010 <packaging >jar</packaging >
1111
1212 <name >API</name >
Original file line number Diff line number Diff line change 66
77 <groupId >me.dev.lrxh</groupId >
88 <artifactId >Plugin</artifactId >
9- <version >2.4 </version >
9+ <version >2.5 </version >
1010 <packaging >jar</packaging >
1111
1212 <name >Plugin</name >
6969 <dependency >
7070 <groupId >me.dev.lrxh</groupId >
7171 <artifactId >API</artifactId >
72- <version >2.4 </version >
72+ <version >2.5 </version >
7373 </dependency >
7474 <dependency >
7575 <groupId >io.papermc.paper</groupId >
Original file line number Diff line number Diff line change @@ -85,6 +85,40 @@ public Arena(String name, long time) {
8585 this .whitelistedBlocks = new ArrayList <>();
8686 }
8787
88+ @ Override
89+ public double getBuildLimit () {
90+ return owner != null ? owner .getBuildLimit () : buildLimit ;
91+ }
92+
93+ @ Override
94+ public List <Material > getWhitelistedBlocks () {
95+ return owner != null ? owner .getWhitelistedBlocks () : whitelistedBlocks ;
96+ }
97+
98+ @ Override
99+ public int getDeathY () {
100+ return owner != null ? owner .getDeathY () : deathY ;
101+ }
102+
103+ @ Override
104+ public long getTime () {
105+ return owner != null ? owner .getTime () : time ;
106+ }
107+
108+ @ Override
109+ public boolean isEnabled () {
110+ return owner != null ? owner .isEnabled () : enabled ;
111+ }
112+
113+ @ Override
114+ public String getDisplayName () {
115+ return owner != null ? owner .getDisplayName () : displayName ;
116+ }
117+
118+ public boolean isAllowedInCustomKit () {
119+ return owner != null ? owner .isAllowedInCustomKit () : allowedInCustomKit ;
120+ }
121+
88122 public static Arena read (String name , ConfigurationSection s ) {
89123 if (!s .contains ("displayName" )) return null ;
90124 List <Material > blocks = new ArrayList <>();
Original file line number Diff line number Diff line change @@ -162,6 +162,12 @@ public void recopyDuplicates(Arena owner) {
162162 }
163163 Bukkit .getScheduler ().runTask (Neptune .get (), () -> {
164164 for (Arena dup : dups ) {
165+ dup .setBuildLimit (owner .getBuildLimit ());
166+ dup .setWhitelistedBlocks (new ArrayList <>(owner .getWhitelistedBlocks ()));
167+ dup .setDeathY (owner .getDeathY ());
168+ dup .setTime (owner .getTime ());
169+ dup .setEnabled (owner .isEnabled ());
170+ dup .setAllowedInCustomKit (owner .isAllowedInCustomKit ());
165171 dup .capture ();
166172 }
167173 });
Original file line number Diff line number Diff line change @@ -58,6 +58,36 @@ public VirtualArena(String name,
5858 this .virtualWorld = virtualWorld ;
5959 }
6060
61+ @ Override
62+ public double getBuildLimit () {
63+ return owner .getBuildLimit ();
64+ }
65+
66+ @ Override
67+ public List <Material > getWhitelistedBlocks () {
68+ return owner .getWhitelistedBlocks ();
69+ }
70+
71+ @ Override
72+ public int getDeathY () {
73+ return owner .getDeathY ();
74+ }
75+
76+ @ Override
77+ public long getTime () {
78+ return owner .getTime ();
79+ }
80+
81+ @ Override
82+ public boolean isEnabled () {
83+ return owner .isEnabled ();
84+ }
85+
86+ @ Override
87+ public String getDisplayName () {
88+ return owner .getDisplayName ();
89+ }
90+
6191 @ Override
6292 public boolean isSetup () {
6393 return redSpawn != null && blueSpawn != null && min != null && max != null && virtualWorld != null ;
You can’t perform that action at this time.
0 commit comments