Commit 74add11 Lee Zheng Han
committed
1 parent 4c29be0 commit 74add11 Copy full SHA for 74add11
File tree 4 files changed +69
-0
lines changed
src/main/java/com/solarrabbit/colorbundles
4 files changed +69
-0
lines changed Original file line number Diff line number Diff line change @@ -81,16 +81,34 @@ public void onEnable() {
81
81
loader .loadRecipes ();
82
82
}
83
83
84
+ /**
85
+ * Adds a {@link NamespacedKey} used to load custom bundles' recipes.
86
+ *
87
+ * @param key namespaced key
88
+ */
84
89
public void addCustomRecipeKey (NamespacedKey key ) {
85
90
customRecipeKeys .add (key );
86
91
}
87
92
93
+ /**
94
+ * Returns whether the recipe is a recipe for custom bundles registered and
95
+ * loaded by the plugin.
96
+ *
97
+ * @param recipe crafting recipe
98
+ * @return {@code true} if recipe is registered and loaded by the plugin
99
+ */
88
100
public boolean isCustomRecipe (Recipe recipe ) {
89
101
if (!(recipe instanceof ShapelessRecipe ))
90
102
return false ;
91
103
return customRecipeKeys .contains (((ShapelessRecipe ) recipe ).getKey ());
92
104
}
93
105
106
+ /**
107
+ * Returns user configurations from {@code config.yml}. This is preferred over
108
+ * {@link #getConfig()} for abstraction purposes.
109
+ *
110
+ * @return plugin's user configurations
111
+ */
94
112
public UserConfig getUserConfig () {
95
113
return userConfig ;
96
114
}
Original file line number Diff line number Diff line change
1
+ /*
2
+ * This file is part of ColorBundles. Copyright (c) 2021 SolarRabbit.
3
+ *
4
+ * ColorBundles is free software: you can redistribute it and/or modify
5
+ * it under the terms of the GNU General Public License as published by
6
+ * the Free Software Foundation, either version 3 of the License, or
7
+ * (at your option) any later version.
8
+ *
9
+ * ColorBundles is distributed in the hope that it will be useful,
10
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
11
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
+ * GNU General Public License for more details.
13
+ *
14
+ * You should have received a copy of the GNU General Public License
15
+ * along with ColorBundles. If not, see <https://www.gnu.org/licenses/>.
16
+ */
17
+
1
18
package com .solarrabbit .colorbundles .loader ;
2
19
3
20
import com .solarrabbit .colorbundles .ColorBundles ;
Original file line number Diff line number Diff line change
1
+ /*
2
+ * This file is part of ColorBundles. Copyright (c) 2021 SolarRabbit.
3
+ *
4
+ * ColorBundles is free software: you can redistribute it and/or modify
5
+ * it under the terms of the GNU General Public License as published by
6
+ * the Free Software Foundation, either version 3 of the License, or
7
+ * (at your option) any later version.
8
+ *
9
+ * ColorBundles is distributed in the hope that it will be useful,
10
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
11
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
+ * GNU General Public License for more details.
13
+ *
14
+ * You should have received a copy of the GNU General Public License
15
+ * along with ColorBundles. If not, see <https://www.gnu.org/licenses/>.
16
+ */
17
+
1
18
package com .solarrabbit .colorbundles .loader ;
2
19
3
20
import com .solarrabbit .colorbundles .ColorBundles ;
Original file line number Diff line number Diff line change
1
+ /*
2
+ * This file is part of ColorBundles. Copyright (c) 2021 SolarRabbit.
3
+ *
4
+ * ColorBundles is free software: you can redistribute it and/or modify
5
+ * it under the terms of the GNU General Public License as published by
6
+ * the Free Software Foundation, either version 3 of the License, or
7
+ * (at your option) any later version.
8
+ *
9
+ * ColorBundles is distributed in the hope that it will be useful,
10
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
11
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
+ * GNU General Public License for more details.
13
+ *
14
+ * You should have received a copy of the GNU General Public License
15
+ * along with ColorBundles. If not, see <https://www.gnu.org/licenses/>.
16
+ */
17
+
1
18
package com .solarrabbit .colorbundles .loader ;
2
19
3
20
import com .solarrabbit .colorbundles .ColorBundles ;
You can’t perform that action at this time.
0 commit comments