Make sure debug is only working in dev mode
This commit is contained in:
parent
33dd653208
commit
9e61718500
1 changed files with 2 additions and 1 deletions
|
@ -1,5 +1,6 @@
|
||||||
package org.betterx.bclib.items;
|
package org.betterx.bclib.items;
|
||||||
|
|
||||||
|
import org.betterx.bclib.BCLib;
|
||||||
import org.betterx.bclib.client.models.ModelsHelper;
|
import org.betterx.bclib.client.models.ModelsHelper;
|
||||||
import org.betterx.bclib.commands.PlaceCommand;
|
import org.betterx.bclib.commands.PlaceCommand;
|
||||||
import org.betterx.bclib.interfaces.ItemModelProvider;
|
import org.betterx.bclib.interfaces.ItemModelProvider;
|
||||||
|
@ -93,7 +94,7 @@ public class DebugDataItem extends Item implements ItemModelProvider {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public InteractionResult useOn(UseOnContext useOnContext) {
|
public InteractionResult useOn(UseOnContext useOnContext) {
|
||||||
if (!useOnContext.getPlayer().canUseGameMasterBlocks()) {
|
if (!useOnContext.getPlayer().canUseGameMasterBlocks() || !BCLib.isDevEnvironment()) {
|
||||||
return InteractionResult.FAIL;
|
return InteractionResult.FAIL;
|
||||||
}
|
}
|
||||||
return interaction.use(useOnContext);
|
return interaction.use(useOnContext);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue