package de.craften.plugins.rpgplus.scripting.api.entities;

import de.craften.plugins.rpgplus.components.entitymanager.ManagedEntity;

/**
 * A lua wrapper for a {@link de.craften.plugins.rpgplus.components.entitymanager.ManagedEntity}.
 */
public class EntityWrapper {
    private final ManagedEntity entity;

    public EntityWrapper(ManagedEntity entity) {
        this.entity = entity;
    }
}

@@ -126,16 +126,91 @@
 dEntity;
+%0Aimport org.luaj.vm2.LuaValue;%0Aimport org.luaj.vm2.lib.jse.CoerceJavaToLua;
 %0A%0A/**%0A *
@@ -457,16 +457,146 @@
  entity;
+%0A%0A    %7D%0A%0A    public static LuaValue wrap(ManagedEntity entity) %7B%0A        return CoerceJavaToLua.coerce(new EntityWrapper(entity));
 %0A    %7D%0A%7D

Add convenient wrapping function to EntityWrapper.