Skip to content

Commit 74add11

Browse files
author
Lee Zheng Han
committed
Add javadoc to classes
1 parent 4c29be0 commit 74add11

File tree

4 files changed

+69
-0
lines changed

4 files changed

+69
-0
lines changed

src/main/java/com/solarrabbit/colorbundles/ColorBundles.java

+18
Original file line numberDiff line numberDiff line change
@@ -81,16 +81,34 @@ public void onEnable() {
8181
loader.loadRecipes();
8282
}
8383

84+
/**
85+
* Adds a {@link NamespacedKey} used to load custom bundles' recipes.
86+
*
87+
* @param key namespaced key
88+
*/
8489
public void addCustomRecipeKey(NamespacedKey key) {
8590
customRecipeKeys.add(key);
8691
}
8792

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+
*/
88100
public boolean isCustomRecipe(Recipe recipe) {
89101
if (!(recipe instanceof ShapelessRecipe))
90102
return false;
91103
return customRecipeKeys.contains(((ShapelessRecipe) recipe).getKey());
92104
}
93105

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+
*/
94112
public UserConfig getUserConfig() {
95113
return userConfig;
96114
}

src/main/java/com/solarrabbit/colorbundles/loader/CustomRecipeLoader.java

+17
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,20 @@
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+
118
package com.solarrabbit.colorbundles.loader;
219

320
import com.solarrabbit.colorbundles.ColorBundles;

src/main/java/com/solarrabbit/colorbundles/loader/DefaultCustomRecipeLoader.java

+17
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,20 @@
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+
118
package com.solarrabbit.colorbundles.loader;
219

320
import com.solarrabbit.colorbundles.ColorBundles;

src/main/java/com/solarrabbit/colorbundles/loader/ItemsAdderCustomRecipeLoader.java

+17
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,20 @@
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+
118
package com.solarrabbit.colorbundles.loader;
219

320
import com.solarrabbit.colorbundles.ColorBundles;

0 commit comments

Comments
 (0)