8000 Fix Grenades / ItemTags by cswhite2000 · Pull Request #859 · PGMDev/PGM · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Fix Grenades / ItemTags #859

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already 8000 on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 24, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
8000
Diff view
1 change: 1 addition & 0 deletions core/src/main/java/tc/oc/pgm/kits/KitMatchModule.java
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ public void onGrenadeExplode(final ProjectileHitEvent event) {
Grenade grenade = Grenade.get(event.getEntity());
if (grenade != null) {
event
.getEntity()
.getWorld()
.createExplosion(
event.getEntity(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ final class LegacyItemTag implements ItemTag<String> {
@Nullable
@Override
public String get(ItemStack item) {
if (!item.hasItemMeta()) return null;
final List<String> lore = item.getItemMeta().getLore();
if (lore == null || lore.isEmpty()) return null;

Expand All @@ -52,6 +53,7 @@ public String get(ItemStack item) {

@Override
public void set(ItemStack item, String value) {
if (!item.hasItemMeta()) return;
ItemMeta itemMeta = item.getItemMeta();
List<String> lore = itemMeta.getLore();

Expand All @@ -68,6 +70,7 @@ public void set(ItemStack item, String value) {

@Override
public void clear(ItemStack item) {
if (!item.hasItemMeta()) return;
ItemMeta itemMeta = item.getItemMeta();
final List<String> lore = itemMeta.getLore();
if (lore == null || lore.isEmpty()) return;
Expand Down
0