Prevent registering recipes if crafting is disabled.
Contributed by Sahar.
This commit is contained in:
@@ -16,6 +16,7 @@
|
||||
*/
|
||||
package handlers.itemhandlers;
|
||||
|
||||
import org.l2jmobius.Config;
|
||||
import org.l2jmobius.gameserver.data.xml.impl.RecipeData;
|
||||
import org.l2jmobius.gameserver.handler.IItemHandler;
|
||||
import org.l2jmobius.gameserver.model.actor.Playable;
|
||||
@@ -39,6 +40,12 @@ public class Recipes implements IItemHandler
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!Config.IS_CRAFTING_ENABLED)
|
||||
{
|
||||
playable.sendMessage("Crafting is disabled, you cannot register this recipe.");
|
||||
return false;
|
||||
}
|
||||
|
||||
final PlayerInstance player = playable.getActingPlayer();
|
||||
if (player.isCrafting())
|
||||
{
|
||||
|
Reference in New Issue
Block a user