mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-18 05:45:03 +00:00
Fixed executeCommand() function for scripting API on the server-side.
This commit is contained in:
1 parent
8b710ed520
commit
5515f5ef83
6 files changed
+25
-20
No files matched your search
@@ -28,6 +28,7 @@ import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.client.MinecraftForgeClient;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.common.util.FakePlayer;
|
||||
import noppes.npcs.CommonProxy;
|
||||
import noppes.npcs.CustomNpcs;
|
||||
import noppes.npcs.LogWriter;
|
||||
@@ -146,6 +147,7 @@ import noppes.npcs.containers.ContainerNpcQuestTypeItem;
|
||||
import noppes.npcs.controllers.PlayerData;
|
||||
import noppes.npcs.entity.*;
|
||||
|
||||
import noppes.npcs.scripted.interfaces.IWorld;
|
||||
import org.lwjgl.input.Keyboard;
|
||||
|
||||
import tconstruct.client.tabs.InventoryTabFactions;
|
||||
@@ -239,6 +241,10 @@ public class ClientProxy extends CommonProxy {
|
||||
}
|
||||
}
|
||||
|
||||
public FakePlayer getCommandPlayer(IWorld world) {
|
||||
return (FakePlayer)(new EntityCustomNpc(world.getMCWorld())).getFakePlayer();
|
||||
}
|
||||
|
||||
private void createFolders() {
|
||||
File file = new File(CustomNpcs.Dir,"assets/customnpcs");
|
||||
if(!file.exists())
|
||||
|
||||
Reference in new issue
Block a user