Skip to content

Commit a2dbabc

Browse files
committed
refactor: replace deprecated method XMaterial.parseMaterial() to XMaterial.get()
Signed-off-by: Cristóbal Veas <[email protected]>
1 parent 992caae commit a2dbabc

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/main/java/team/devblook/akropolis/module/modules/world/Launchpad.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,16 +65,16 @@ public void onEnable() {
6565

6666
if (rawTopBlock == null) {
6767
getPlugin().getLogger().severe("Launchpad' top block is missing, using air item!");
68-
XMaterial.matchXMaterial("AIR").ifPresent(m -> topBlock = m.parseMaterial());
68+
XMaterial.matchXMaterial("AIR").ifPresent(m -> topBlock = m.get());
6969
} else {
70-
XMaterial.matchXMaterial(rawTopBlock).ifPresent(m -> topBlock = m.parseMaterial());
70+
XMaterial.matchXMaterial(rawTopBlock).ifPresent(m -> topBlock = m.get());
7171
}
7272

7373
if (rawBottomBlock == null) {
7474
getPlugin().getLogger().severe("Launchpad' bottom block is missing, using air item!");
75-
XMaterial.matchXMaterial("AIR").ifPresent(m -> bottomBlock = m.parseMaterial());
75+
XMaterial.matchXMaterial("AIR").ifPresent(m -> bottomBlock = m.get());
7676
} else {
77-
XMaterial.matchXMaterial(rawBottomBlock).ifPresent(m -> bottomBlock = m.parseMaterial());
77+
XMaterial.matchXMaterial(rawBottomBlock).ifPresent(m -> bottomBlock = m.get());
7878
}
7979
}
8080

src/main/java/team/devblook/akropolis/util/ItemStackBuilder.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ public static ItemStack parseMaterial(ConfigurationSection section) {
155155

156156
ItemStack item = xmaterial.get().parseItem();
157157

158-
if (item != null && item.getType() == XMaterial.PLAYER_HEAD.parseMaterial()) {
158+
if (item != null && item.getType() == XMaterial.PLAYER_HEAD.get()) {
159159
if (section.contains("base64")) {
160160
item = ((HeadHook) PLUGIN.getHookManager().getPluginHook("BASE64"))
161161
.getHead(section.getString("base64"));

0 commit comments

Comments
 (0)