+ Added adapter concept
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
package commands.dew.adapter;
|
||||
|
||||
import commands.dew.core.api.IDewPlayer;
|
||||
|
||||
public class KittyAdapterDewPlayer implements IDewPlayer
|
||||
{
|
||||
@Override
|
||||
public String getName() {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getUniqueID() {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -3,4 +3,5 @@ package commands.dew.core.api;
|
||||
public interface IDewPlayer
|
||||
{
|
||||
public String getName();
|
||||
public String getUniqueID();
|
||||
}
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
package commands.dew.core.impl;
|
||||
|
||||
import commands.dew.core.api.IDewPlayer;
|
||||
|
||||
public class DewCore
|
||||
{
|
||||
public DewCore(IDewPlayer player)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
@@ -7,11 +7,18 @@ import commands.dew.core.api.IDewLuaSerializable;
|
||||
|
||||
public class DewLuaCore implements IDewLuaCore
|
||||
{
|
||||
public void Parse(IDewLuaSerializable item)
|
||||
public static void toLua(IDewLuaSerializable item)
|
||||
{
|
||||
for(Field field : item.getClass().getDeclaredFields())
|
||||
{
|
||||
|
||||
try
|
||||
{
|
||||
System.out.println(field.getName() + " " + field.getType() + " " + field.get(item));
|
||||
}
|
||||
catch (IllegalArgumentException | IllegalAccessException e)
|
||||
{
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user