Skip to content

Commit

Permalink
chore(Core): remove metadata methods (#257)
Browse files Browse the repository at this point in the history
  • Loading branch information
Snabeldier authored Dec 22, 2024
1 parent 3873b08 commit 9efac1b
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 44 deletions.
35 changes: 0 additions & 35 deletions src/main/java/minevalley/core/api/Core.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import com.google.gson.Gson;
import lombok.NonNull;
import minevalley.core.api.armorstand.FakeArmorStand;
import minevalley.core.api.command.PlayerCommand;
import minevalley.core.api.corporations.Group;
import minevalley.core.api.corporations.companies.*;
import minevalley.core.api.database.DatabaseEntry;
Expand Down Expand Up @@ -58,8 +57,6 @@
import org.bukkit.event.player.PlayerInteractEvent;
import org.bukkit.inventory.Inventory;
import org.bukkit.inventory.ItemStack;
import org.bukkit.metadata.MetadataValue;
import org.bukkit.metadata.Metadatable;
import org.bukkit.plugin.java.JavaPlugin;
import org.bukkit.scheduler.BukkitTask;
import org.bukkit.util.Vector;
Expand Down Expand Up @@ -356,38 +353,6 @@ public static double getStatistic(String key) {
return server.getStatistic(key);
}

/**
* Adds this object as a metadata to the metadatable object.
*
* @param metadatable object to which the metadata should be added
* @param key key under which the metadata can be found
* @param value object to be added as metadata
*/
public static void setMetadata(Metadatable metadatable, String key, Object value) {
server.setMetadata(metadatable, key, value);
}

/**
* Removes all metadata-objects with the given key from the specific metadatable object.
*
* @param metadatable object from which the metadata should be removed
* @param key object
*/
public static void removeMetadata(Metadatable metadatable, String key) {
server.removeMetadata(metadatable, key);
}

/**
* Gets a list of all metadata-values in link to the object.
*
* @param metadatable object to get linked data from
* @param key key of the metadata
* @return list of all metadata-values
*/
public static List<MetadataValue> getMetadata(Metadatable metadatable, String key) {
return server.getMetadata(metadatable, key);
}

/**
* Removes the color-codes from a given string
*
Expand Down
9 changes: 0 additions & 9 deletions src/main/java/minevalley/core/api/CoreServer.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import com.google.gson.Gson;
import lombok.NonNull;
import minevalley.core.api.armorstand.FakeArmorStand;
import minevalley.core.api.command.PlayerCommand;
import minevalley.core.api.corporations.Group;
import minevalley.core.api.corporations.companies.*;
import minevalley.core.api.database.DatabaseEntry;
Expand Down Expand Up @@ -54,8 +53,6 @@
import org.bukkit.event.player.PlayerInteractEvent;
import org.bukkit.inventory.Inventory;
import org.bukkit.inventory.ItemStack;
import org.bukkit.metadata.MetadataValue;
import org.bukkit.metadata.Metadatable;
import org.bukkit.plugin.java.JavaPlugin;
import org.bukkit.scheduler.BukkitTask;
import org.bukkit.util.Vector;
Expand Down Expand Up @@ -130,12 +127,6 @@ public interface CoreServer {

ChatMenu createChatMenu();

void setMetadata(Metadatable metadatable, String key, Object value);

void removeMetadata(Metadatable metadatable, String key);

List<MetadataValue> getMetadata(Metadatable metadatable, String key);

Gson getGson();

String removeColorCodes(String text);
Expand Down

0 comments on commit 9efac1b

Please sign in to comment.