NPC npc = ((BukkitScriptEntryData)scriptEntry.entryData).getNPC().getCitizen();
boolean vulnerable;
if (toggle == Toggle.TOGGLE)
vulnerable = !npc.data().get(NPC.DEFAULT_PROTECTED_METADATA, true);
else vulnerable = Boolean.valueOf(toggle.toString());
npc.data().set(NPC.DEFAULT_PROTECTED_METADATA, !vulnerable);
}