Oh ok isnt it something with the constructor ? we had problem with armer code which was calling the constructor of playerclasshandler and it has set the current class to unset again do you have a solution 4 that ?
We have a command (/class) which is checking what is the current class. You can look at it here : https://github.com/KakesRevenge/ProjektWow/blob/master/src/main/java/cz/grossik/projektwow/command/GetClass.java
+ You dont need to spawn item you can just do event.drops.add(youritemstack)
EDIT : this code works fine for me
@SubscribeEvent
public void harvestDrops (HarvestDropsEvent event) {
if(event.block.equals(Blocks.stained_glass)) {
event.drops.add(new ItemStack(Blocks.stained_glass,1,event.blockMetadata));
}
}