- Add the Codota plugin to your IDE and get smart completions
private void myMethod () {DateTime d =
new DateTime()
DateTimeFormatter formatter;String text;formatter.parseDateTime(text)
Object instant;new DateTime(instant)
- Smart code suggestions by Codota
}
public void update() { if (location == null || (!updateLocation && !updateDirection)) { return; } Entity entityReference = entity == null ? null : entity.get(); if (entityReference != null) { Location currentLocation = getEntityLocation(entityReference); if (updateDirection) { setDirection(currentLocation.getDirection()); } if (updateLocation) { updateFrom(currentLocation); } } }
protected void startProjectileEffects(CastContext context, String effectKey) { Collection<EffectPlayer> projectileEffects = context.getEffects(effectKey); for (EffectPlayer apiEffectPlayer : projectileEffects) { if (effectLocation == null) { effectLocation = new DynamicLocation(actionContext.getTargetLocation()); effectLocation.setDirection(velocity); } if (activeProjectileEffects == null) { activeProjectileEffects = new ArrayList<>(); } // Hrm- this is ugly, but I don't want the API to depend on EffectLib. if (apiEffectPlayer instanceof com.elmakers.mine.bukkit.effect.EffectPlayer) { com.elmakers.mine.bukkit.effect.EffectPlayer effectPlayer = (com.elmakers.mine.bukkit.effect.EffectPlayer)apiEffectPlayer; effectPlayer.setEffectPlayList(activeProjectileEffects); if (projectileEffectsUseTarget) { Entity sourceEntity = actionContext.getEntity(); DynamicLocation sourceLocation = sourceEntity == null ? new DynamicLocation(actionContext.getLocation()) : new DynamicLocation(sourceEntity); effectPlayer.startEffects(sourceLocation, effectLocation); } else { effectPlayer.startEffects(effectLocation, null); } } } } }
effectLocation.setDirection(velocity);