Skip to content

Commit

Permalink
Get rid of removed legacy setting from GameBox
Browse files Browse the repository at this point in the history
  • Loading branch information
NiklasEi committed Mar 30, 2020
1 parent b402444 commit c3fa817
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<artifactId>cookieclicker</artifactId>
<name>CookieClicker</name>
<packaging>jar</packaging>
<version>3.0.0-beta</version>
<version>3.0.0-beta.2</version>
<description>The super addictive backing game</description>

<distributionManagement>
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/me/nikl/cookieclicker/CookieClicker.java
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ public class CookieClicker extends Game {
private BoostManager boostManager;

public CookieClicker(GameBox gameBox) {
super(gameBox, GameBox.MODULE_COOKIECLICKER);
super(gameBox, Module.MODULE_COOKIECLICKER);
}

@Override
Expand Down
4 changes: 3 additions & 1 deletion src/main/java/me/nikl/cookieclicker/Module.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@
import me.nikl.gamebox.module.GameBoxModule;

public class Module extends GameBoxModule {
public final static String MODULE_COOKIECLICKER = "cookieclicker";

@Override
public void onEnable() {
registerGame("cookieclicker", CookieClicker.class, "cc");
registerGame(MODULE_COOKIECLICKER, CookieClicker.class, "cc");
}

@Override
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/me/nikl/cookieclicker/buildings/Mine.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public Mine(CookieClicker plugin, int slot, Buildings building) {
icon = new ItemStack(Material.DIAMOND_PICKAXE, 1);
icon.setAmount(1);
ItemMeta meta = icon.getItemMeta();
if (!GameBoxSettings.version1_8) meta.addItemFlags(ItemFlag.HIDE_ATTRIBUTES);
meta.addItemFlags(ItemFlag.HIDE_ATTRIBUTES);
meta.setDisplayName(lang.GAME_BUILDING_NAME.replace("%name%", name));
icon.setItemMeta(meta);

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/me/nikl/cookieclicker/upgrades/Upgrade.java
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ protected void loadLanguage(UpgradeType upgradeType, Buildings... buildings) {


ItemMeta meta = icon.getItemMeta();
if (!GameBoxSettings.version1_8) meta.addItemFlags(ItemFlag.values());
meta.addItemFlags(ItemFlag.values());
meta.setDisplayName(lang.GAME_UPGRADE_NAME.replace("%name%", name));
meta.setLore(lore);
icon.setItemMeta(meta);
Expand Down

0 comments on commit c3fa817

Please sign in to comment.