+ Added adapter concept
This commit is contained in:
+1
-1
@@ -109,7 +109,7 @@
|
||||
"Localized Strings","DBFlushInfo","Takes all objects queued for the database and writes them to the database, then says how many were written."
|
||||
"Localized Strings","DBStatsInfo","Shows current statistics for the database"
|
||||
"Localized Strings","DefaultDanceInfo","y'all know forknife, get ready to dance, or make a friend dance with @!"
|
||||
"Localized Strings","DewInfo",""
|
||||
"Localized Strings","DewInfo","A fun little dev experiment!"
|
||||
"Localized Strings","DoWorkFinished","I finished with my work! :D"
|
||||
"Localized Strings","DoWorkInfo","Occupies a core for a few seconds"
|
||||
"Localized Strings","EightBallError","Hmm? You'll need to ask a question!"
|
||||
|
||||
|
@@ -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