File tree Expand file tree Collapse file tree 1 file changed +16
-4
lines changed
src/main/java/com/falsepattern/lib/api Expand file tree Collapse file tree 1 file changed +16
-4
lines changed Original file line number Diff line number Diff line change 1
1
package com .falsepattern .lib .api ;
2
2
3
3
final class Deprecation {
4
+ private static boolean shortWarning = false ;
4
5
static void warn () {
5
- new Exception ("\n DEPRECATION WARNING\n DEPRECATION WARNING\n " +
6
- "Someone used the deprecated FalsePatternLib api from 0.5 and before.\n " +
7
- "This api was deprecated in 0.6.0, and will be REMOVED in FalsePatternLib 0.7! You should probably update your mods.\n " +
8
- "See the following stacktrace for hints on what mod might be the cause." ).printStackTrace ();
6
+ if (shortWarning ) {
7
+ new DeprecationWarning ("FalsePatternLib api deprecation warning. The api will be removed in 0.7! Update your mod. Stacktrace:" ).printStackTrace ();
8
+ } else {
9
+ new DeprecationWarning ("\n DEPRECATION WARNING\n DEPRECATION WARNING\n " +
10
+ "Someone used the deprecated FalsePatternLib api from 0.5 and before.\n " +
11
+ "This api was deprecated in 0.6.0, and will be REMOVED in FalsePatternLib 0.7! You should probably update your mods.\n " +
12
+ "See the following stacktrace for hints on what mod might be the cause." ).printStackTrace ();
13
+ shortWarning = true ;
14
+ }
15
+ }
16
+
17
+ private static class DeprecationWarning extends Exception {
18
+ public DeprecationWarning (String message ) {
19
+ super (message );
20
+ }
9
21
}
10
22
}
You can’t perform that action at this time.
0 commit comments