Skip to content

Commit

Permalink
LightAPI: bukkit-common: Add isCompatibilityMode()
Browse files Browse the repository at this point in the history
Change-Id: I5b2cbd7dbdacaf5259fe338b296ac2877917b6af
  • Loading branch information
BeYkeRYkt committed Dec 4, 2021
1 parent 6499312 commit 94d1bce
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,11 @@ int setLightLevel(World world, int blockX, int blockY, int blockZ, int lightLeve
*/
boolean isBackwardAvailable();

/**
* N/A
*/
boolean isCompatibilityMode();

/**
* N/A
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ public class BukkitPlatformImpl implements IPlatformImpl, IBukkitExtension {
private boolean DEBUG = false;
private boolean isInit = false;
private boolean forceLegacy = false;
private boolean compatibilityMode = false;
private IHandler mHandler;
private IChunkObserver mChunkObserver;
private ILightEngine mLightEngine;
Expand Down Expand Up @@ -165,7 +166,7 @@ private void initHandler() throws Exception {
}

// compatibility mode (1.17+)
boolean compatibilityMode = getConfig().getBoolean(CONFIG_ENABLE_COMPATIBILITY_MODE);
compatibilityMode = getConfig().getBoolean(CONFIG_ENABLE_COMPATIBILITY_MODE);
if (compatibilityMode) {
if (VersionUtil.compareBukkitVersionTo("1.17") >= 0) {
info("Compatibility mode is enabled");
Expand Down Expand Up @@ -403,4 +404,9 @@ public boolean isBackwardAvailable() {
return false;
}
}

@Override
public boolean isCompatibilityMode() {
return compatibilityMode;
}
}

0 comments on commit 94d1bce

Please sign in to comment.