Skip to content

Commit

Permalink
1.20.2 Update
Browse files Browse the repository at this point in the history
  • Loading branch information
Navoei committed Oct 14, 2023
1 parent 5c62e04 commit 4c74cbc
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 40 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ group = maven_group

processResources {
filesMatching("plugin.yml") {
expand "version": plugin_version,
expand "plugin_version": plugin_version,
"bukkit_api_version": bukkit_api_version
}
}
Expand Down
6 changes: 3 additions & 3 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ java_version=17
mp3spi_version=1.9.5.4

bukkit_api_version=1.20
bukkit_version=1.20.1-R0.1-SNAPSHOT
bukkit_version=1.20.2-R0.1-SNAPSHOT
mod_id=customdiscsplugin

# Target an older API to make it compatible with older versions of Simple Voice Chat
voicechat_api_version=2.3.3
voicechat_api_version=2.4.11

plugin_version=2.4.1
plugin_version=2.5
maven_group=me.Navoei.customdiscsplugin
archives_base_name=custom-discs
20 changes: 2 additions & 18 deletions src/main/java/me/Navoei/customdiscsplugin/HopperManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import org.bukkit.block.BlockFace;
import org.bukkit.block.BlockState;
import org.bukkit.block.Jukebox;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import org.bukkit.event.Listener;
Expand Down Expand Up @@ -101,24 +102,7 @@ public void onChunkLoad(ChunkLoadEvent event) {
}

private boolean isCustomMusicDisc (ItemStack item) {

return item.getItemMeta().getPersistentDataContainer().has(new NamespacedKey(customDiscs, "customdisc"), PersistentDataType.STRING) && (
item.getType().equals(Material.MUSIC_DISC_13) ||
item.getType().equals(Material.MUSIC_DISC_CAT) ||
item.getType().equals(Material.MUSIC_DISC_BLOCKS) ||
item.getType().equals(Material.MUSIC_DISC_CHIRP) ||
item.getType().equals(Material.MUSIC_DISC_FAR) ||
item.getType().equals(Material.MUSIC_DISC_MALL) ||
item.getType().equals(Material.MUSIC_DISC_MELLOHI) ||
item.getType().equals(Material.MUSIC_DISC_STAL) ||
item.getType().equals(Material.MUSIC_DISC_STRAD) ||
item.getType().equals(Material.MUSIC_DISC_WARD) ||
item.getType().equals(Material.MUSIC_DISC_11) ||
item.getType().equals(Material.MUSIC_DISC_WAIT) ||
item.getType().equals(Material.MUSIC_DISC_OTHERSIDE) ||
item.getType().equals(Material.MUSIC_DISC_5) ||
item.getType().equals(Material.MUSIC_DISC_PIGSTEP)
);
return item.getItemMeta().getPersistentDataContainer().has(new NamespacedKey(customDiscs, "customdisc"), PersistentDataType.STRING) && item.getType().toString().contains("MUSIC_DISC");
}

private static HopperManager instance;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import org.bukkit.Location;
import org.bukkit.Particle;
import org.bukkit.block.Jukebox;
import org.bukkit.inventory.ItemStack;
import org.bukkit.scheduler.BukkitRunnable;

import java.util.HashMap;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -159,22 +159,7 @@ private String customName(ArrayList<String> q) {
}

private boolean isMusicDisc(Player p) {

return p.getInventory().getItemInMainHand().getType().equals(Material.MUSIC_DISC_13) ||
p.getInventory().getItemInMainHand().getType().equals(Material.MUSIC_DISC_CAT) ||
p.getInventory().getItemInMainHand().getType().equals(Material.MUSIC_DISC_BLOCKS) ||
p.getInventory().getItemInMainHand().getType().equals(Material.MUSIC_DISC_CHIRP) ||
p.getInventory().getItemInMainHand().getType().equals(Material.MUSIC_DISC_FAR) ||
p.getInventory().getItemInMainHand().getType().equals(Material.MUSIC_DISC_MALL) ||
p.getInventory().getItemInMainHand().getType().equals(Material.MUSIC_DISC_MELLOHI) ||
p.getInventory().getItemInMainHand().getType().equals(Material.MUSIC_DISC_STAL) ||
p.getInventory().getItemInMainHand().getType().equals(Material.MUSIC_DISC_STRAD) ||
p.getInventory().getItemInMainHand().getType().equals(Material.MUSIC_DISC_WARD) ||
p.getInventory().getItemInMainHand().getType().equals(Material.MUSIC_DISC_11) ||
p.getInventory().getItemInMainHand().getType().equals(Material.MUSIC_DISC_WAIT) ||
p.getInventory().getItemInMainHand().getType().equals(Material.MUSIC_DISC_OTHERSIDE) ||
p.getInventory().getItemInMainHand().getType().equals(Material.MUSIC_DISC_5) ||
p.getInventory().getItemInMainHand().getType().equals(Material.MUSIC_DISC_PIGSTEP);
return p.getInventory().getItemInMainHand().getType().toString().contains("MUSIC_DISC");
}

}
2 changes: 1 addition & 1 deletion src/main/resources/plugin.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: CustomDiscs
version: '${version}'
version: '${plugin_version}'
main: me.Navoei.customdiscsplugin.CustomDiscs
api-version: '${bukkit_api_version}'
prefix: CustomDiscs
Expand Down

0 comments on commit 4c74cbc

Please sign in to comment.