Skip to content

Commit

Permalink
drop support for Craftory Tech as project has been abandoned since 1.18
Browse files Browse the repository at this point in the history
  • Loading branch information
steve4744 committed May 2, 2024
1 parent a9f41a8 commit 21fcb06
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 82 deletions.
15 changes: 1 addition & 14 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
<name>xenondevs repository</name>
<url>https://repo.xenondevs.xyz/releases</url>
</repository>
<!-- SlimeFun4, ItemsAdder & Craftory Repo -->
<!-- SlimeFun4 & ItemsAdder Repo -->
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
Expand Down Expand Up @@ -86,19 +86,6 @@
<version>RC-35</version>
<scope>provided</scope>
</dependency>
<!-- Craftory -->
<dependency>
<groupId>com.github.steve4744</groupId>
<artifactId>craftory-tech</artifactId>
<version>v0.8.3</version>
<scope>provided</scope>
<exclusions>
<exclusion>
<groupId>com.github.oraxen</groupId>
<artifactId>Oraxen</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- Nova -->
<dependency>
<groupId>xyz.xenondevs.nova</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ of this software and associated documentation files (the "Software"), to deal
import io.github.steve4744.whatisthis.utils.OraxenHandler;
import io.github.steve4744.whatisthis.utils.SlimefunHandler;
import io.github.steve4744.whatisthis.utils.Utils;
import io.github.steve4744.whatisthis.utils.CraftoryHandler;
import io.github.steve4744.whatisthis.utils.ItemsAdderHandler;
import io.github.steve4744.whatisthis.utils.MythicMobsHandler;
import io.github.steve4744.whatisthis.utils.NovaHandler;
Expand All @@ -89,7 +88,6 @@ public class DataHandler {
private boolean slimefun;
private boolean itemsadder;
private boolean oraxen;
private boolean craftory;
private boolean mythicmobs;

private static final double DEFAULT_HEALTH = 1.0;
Expand All @@ -98,7 +96,6 @@ public class DataHandler {
private static final String NOVA = "Nova";
private static final String ITEMSADDER = "ItemsAdder";
private static final String ORAXEN = "Oraxen";
private static final String CRAFTORY = "Craftory";
private static final String MYTHICMOBS = "MythicMobs";

private Map<String, Integer> itemDrops = new HashMap<>(); // material -> amount
Expand All @@ -110,7 +107,6 @@ public DataHandler(WhatIsThis plugin) {
this.nova = pm.isPluginEnabled(NOVA);
this.itemsadder = pm.isPluginEnabled(ITEMSADDER);
this.oraxen = pm.isPluginEnabled(ORAXEN);
this.craftory = pm.isPluginEnabled(CRAFTORY);
this.mythicmobs = pm.isPluginEnabled(MYTHICMOBS);
}

Expand Down Expand Up @@ -150,12 +146,6 @@ public String getDisplayName(Block block, Player player) {
return "";
}

} else if (isCraftoryBlock(block) && includePlugin(CRAFTORY)) {
targetName = ChatColor.stripColor(CraftoryHandler.getDisplayName(block));
if (plugin.getSettings().getCustomBlacklist(CRAFTORY).contains(targetName)) {
return "";
}

} else {
if (block.getType() == Material.PLAYER_HEAD || block.getType() == Material.PLAYER_WALL_HEAD) {
Skull skull = (Skull) block.getState();
Expand Down Expand Up @@ -311,10 +301,6 @@ public Set<String> getItemDrops(Block block, Player player) {
itemDrops.put(ChatColor.stripColor(OraxenHandler.getDisplayName(block)), 1);
return getItemDropNames();
}
if (isCraftoryBlock(block)) {
itemDrops.put(ChatColor.stripColor(CraftoryHandler.getDisplayName(block)), 1);
return getItemDropNames();
}

Set<String> zeroDropItems = new HashSet<String>();

Expand Down Expand Up @@ -393,7 +379,7 @@ private String translateEntityName(String name, Player player) {
}

public boolean isCustomBlock(Block block) {
return isSlimefunBlock(block) || isNovaBlock(block) || isItemsAdderBlock(block) || isOraxenBlock(block) || isCraftoryBlock(block);
return isSlimefunBlock(block) || isNovaBlock(block) || isItemsAdderBlock(block) || isOraxenBlock(block);
}

private boolean isSlimefunBlock(Block block) {
Expand All @@ -420,10 +406,6 @@ private boolean isOraxenEntity(Entity entity) {
return oraxen ? OraxenHandler.isOraxen(entity) : false;
}

private boolean isCraftoryBlock(Block block) {
return craftory ? CraftoryHandler.isCraftory(block.getLocation()) : false;
}

private boolean isMythicMobsEntity(Entity entity) {
return mythicmobs ? MythicMobsHandler.isMythicMobs(entity) : false;
}
Expand All @@ -446,9 +428,6 @@ public String getCustomResourceName(Block block) {

} else if (isOraxenBlock(block)) {
return ORAXEN;

} else if (isCraftoryBlock(block)) {
return CRAFTORY;
}
return "";
}
Expand Down

This file was deleted.

2 changes: 1 addition & 1 deletion src/main/resources/plugin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ author: steve4744
version: ${project.version}
api-version: 1.20.6
description: Displays the name of the block or entity that you are looking at.
softdepend: [Slimefun, Nova, ItemsAdder, PlaceholderAPI, Oraxen, Craftory, MythicMobs]
softdepend: [Slimefun, Nova, ItemsAdder, PlaceholderAPI, Oraxen, MythicMobs]

commands:
whatisthis:
Expand Down

0 comments on commit 21fcb06

Please sign in to comment.