Jump to content

Glowing Item Expression


hapily

Recommended Posts

Glowing Item Expression

Returns an item that appears to be enchanted.

Requirements

Skript
Skript-reflect


Syntax
 

(shiny|glowing|glow|enchanted|glinted) %itemstack%


Example Usage
 

give player shiny stone
give player glinted stone
add 1 of glinted stone to player's inventory
set player's helmet to glinted stone

Code

 

import:
	java.lang.System
	java.lang.Object
	java.lang.Enum

import:	
	ch.njol.skript.Skript
	org.bukkit.inventory.ItemFlag
			
expression (shiny|glowing|glow|enchanted|glinted) %itemstack%:
	get:
		expr-1.addItemFlags(ItemFlag.HIDE_ENCHANTS)
		if expr-1 is not fishing rod:	
			expr-1.addUnsafeEnchantment(LURE, 1)
		if expr-1 is fishing rod:
			expr-1.addUnsafeEnchantment(CHANNELING, 1)
		return expr-1
	

 

Edited by hapily
Link to comment
Share on other sites

  • hapily changed the title to Glowing Item Expression
52 minutes ago, Echology said:

you can always just use skbee and skript and just:
 

%item% of protection 1 with all flags hidden

or use skquery and their glowing expression

both are one line compared to this.

This is an expression made in skript-reflect and allows you to use this instead of downloading other addons that come with some other features you may not use. Sure, SkBee is very useful and I would say that I would use the nbt feature of skBee, but other people may not. Either way, this is just an alternative. This is also just something I made since I'm starting to learn skript-reflect and I thought I'd share in-case anybody else wanted to use it.

Edited by hapily
  • Like 1
Link to comment
Share on other sites

  • 2 years later...
  • 3 weeks later...
Guest
This topic is now closed to further replies.
×
×
  • Create New...