spigotplugins / fakeplayer

(WIP) A plugin allows you to create fake players to increase your server player count.
https://www.spigotmc.org/resources/73139/
MIT License
49 stars 16 forks source link

Bug #4

Closed taooceros closed 4 years ago

taooceros commented 4 years ago

I think there is an issue for reloading plugin after an fake player has been created. When I deletes the folder storing the config, this won't appear.

Server: Paper-209

[12:59:30 ERROR]: [FakePlayer] [ACF] Exception in command: fakeplayer reload
[12:59:30 ERROR]: [FakePlayer] [ACF] java.lang.reflect.InvocationTargetException
[12:59:30 ERROR]: [FakePlayer] [ACF]    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[12:59:30 ERROR]: [FakePlayer] [ACF]    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[12:59:30 ERROR]: [FakePlayer] [ACF]    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[12:59:30 ERROR]: [FakePlayer] [ACF]    at java.base/java.lang.reflect.Method.invoke(Method.java:566)
[12:59:30 ERROR]: [FakePlayer] [ACF]    at com.infumia.fakeplayer.commands.RegisteredCommand.invoke(RegisteredCommand.java:154)
[12:59:30 ERROR]: [FakePlayer] [ACF]    at com.infumia.fakeplayer.commands.BaseCommand.executeCommand(BaseCommand.java:577)
[12:59:30 ERROR]: [FakePlayer] [ACF]    at com.infumia.fakeplayer.commands.BaseCommand.execute(BaseCommand.java:513)
[12:59:30 ERROR]: [FakePlayer] [ACF]    at com.infumia.fakeplayer.commands.RootCommand.execute(RootCommand.java:99)
[12:59:30 ERROR]: [FakePlayer] [ACF]    at com.infumia.fakeplayer.commands.BukkitRootCommand.execute(BukkitRootCommand.java:79)
[12:59:30 ERROR]: [FakePlayer] [ACF]    at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:159)
[12:59:30 ERROR]: [FakePlayer] [ACF]    at org.bukkit.craftbukkit.v1_15_R1.CraftServer.dispatchCommand(CraftServer.java:752)
[12:59:30 ERROR]: [FakePlayer] [ACF]    at net.minecraft.server.v1_15_R1.PlayerConnection.handleCommand(PlayerConnection.java:1826)
[12:59:30 ERROR]: [FakePlayer] [ACF]    at net.minecraft.server.v1_15_R1.PlayerConnection.a(PlayerConnection.java:1634)
[12:59:30 ERROR]: [FakePlayer] [ACF]    at net.minecraft.server.v1_15_R1.PacketPlayInChat.a(PacketPlayInChat.java:47)
[12:59:30 ERROR]: [FakePlayer] [ACF]    at net.minecraft.server.v1_15_R1.PacketPlayInChat.a(PacketPlayInChat.java:5)
[12:59:30 ERROR]: [FakePlayer] [ACF]    at net.minecraft.server.v1_15_R1.PlayerConnectionUtils.lambda$ensureMainThread$0(PlayerConnectionUtils.java:23)
[12:59:30 ERROR]: [FakePlayer] [ACF]    at net.minecraft.server.v1_15_R1.TickTask.run(SourceFile:18)
[12:59:30 ERROR]: [FakePlayer] [ACF]    at net.minecraft.server.v1_15_R1.IAsyncTaskHandler.executeTask(IAsyncTaskHandler.java:136)
[12:59:30 ERROR]: [FakePlayer] [ACF]    at net.minecraft.server.v1_15_R1.IAsyncTaskHandlerReentrant.executeTask(SourceFile:23)
[12:59:30 ERROR]: [FakePlayer] [ACF]    at net.minecraft.server.v1_15_R1.IAsyncTaskHandler.executeNext(IAsyncTaskHandler.java:109)
[12:59:30 ERROR]: [FakePlayer] [ACF]    at net.minecraft.server.v1_15_R1.MinecraftServer.ba(MinecraftServer.java:1077)
[12:59:30 ERROR]: [FakePlayer] [ACF]    at net.minecraft.server.v1_15_R1.MinecraftServer.executeNext(MinecraftServer.java:1070)
[12:59:30 ERROR]: [FakePlayer] [ACF]    at net.minecraft.server.v1_15_R1.IAsyncTaskHandler.executeAll(IAsyncTaskHandler.java:95)
[12:59:30 ERROR]: [FakePlayer] [ACF]    at net.minecraft.server.v1_15_R1.MinecraftServer.a(MinecraftServer.java:1203)
[12:59:30 ERROR]: [FakePlayer] [ACF]    at net.minecraft.server.v1_15_R1.MinecraftServer.run(MinecraftServer.java:946)
[12:59:30 ERROR]: [FakePlayer] [ACF]    at java.base/java.lang.Thread.run(Thread.java:834)
[12:59:30 ERROR]: [FakePlayer] [ACF] Caused by: java.lang.ClassCastException: class com.infumia.fakeplayer.file.configuration.MemorySection cannot be cast to class java.lang.String (com.infumia.fakeplayer.file.configuration.MemorySection is in unnamed module of loader org.bukkit.plugin.java.PluginClassLoader @454ed4a; java.lang.String is in module java.base of loader 'bootstrap')
[12:59:30 ERROR]: [FakePlayer] [ACF]    at com.infumia.fakeplayer.file.FakesFile.lambda$0(FakesFile.java:46)
[12:59:30 ERROR]: [FakePlayer] [ACF]    at java.base/java.lang.Iterable.forEach(Iterable.java:75)
[12:59:30 ERROR]: [FakePlayer] [ACF]    at com.infumia.fakeplayer.file.FakesFile.onLoad(FakesFile.java:42)
[12:59:30 ERROR]: [FakePlayer] [ACF]    at com.infumia.fakeplayer.file.FlManaged.load(FlManaged.java:50)
[12:59:30 ERROR]: [FakePlayer] [ACF]    at com.infumia.fakeplayer.FakePlayerAPI.reloadPlugin(FakePlayerAPI.java:50)
[12:59:30 ERROR]: [FakePlayer] [ACF]    at com.infumia.fakeplayer.commands.FakePlayerCommand.reloadCommand(FakePlayerCommand.java:40)
[12:59:30 ERROR]: [FakePlayer] [ACF]    ... 26 more
portlek commented 4 years ago

can you put these errors in a code case like; image

portlek commented 4 years ago

and probably your fakes.yml file has a wrong format, can you put the file too.

taooceros commented 4 years ago

I think I don't have a "fakes.yml" in the plugins folder.

Config.yml

file-version: '1.0'
plugin-prefix: '&6[&eFakePlayer&6]'
plugin-language: en
check-for-update: true
tab-name: '&e[Player] &a%player_name%'

fakes.json

{
  "fakes": {
    "Type": {

    }
  },
  "file-version": "1.0"
}

menu.yml

file-version: '1.0'
fake-players:
  title: '&eFake Players'
  fake-player:
    row: 0
    column: 0
    fake-player:
      material: PLAYER_HEAD
      amount: 1
      display-name: '&a%player_name%'
      lore:
      - ''
      - '&7Right Click to delete this fake player.'
      - '&7Left Click to teleport this fake player.'
      - '&7Middle Click to toggle visible this fake player.'
      flags: []
  add:
    row: 4
    column: 4
    add:
      material: APPLE
      amount: 1
      display-name: '&aAdd Fake Player'
      lore:
      - ''
      - '&7Click and add fake player to your location.'
      flags: []
  next:
    row: 5
    column: 5
    next:
      material: ARROW
      amount: 1
      display-name: '&aNext'
      lore:
      - ''
      - '&7Click and see the next page.'
      flags: []
  previous:
    row: 5
    column: 3
    previous:
      material: ARROW
      amount: 1
      display-name: '&aPrevious'
      lore:
      - ''
      - '&7Click and see the previous page.'
      flags: []
portlek commented 4 years ago

i mean fakes.json actually nvm.

{
  "fakes": {
  },
  "file-version": "1.0"
}

remove the type section like that.

taooceros commented 4 years ago

ok, thanks. Is it the list of all the fake players that has been added in the game? Is "Type" the prefix of a fake player when I want to add it? when I add a new fake player, it ask me to write something after "Type..."

portlek commented 4 years ago

yes its a list for added fakes. actually, the design is like that

{
  "fakes": {
    "test-fake": "location-string",
    "other-fake": "other-location-string"
  },
  "file-version": "1.0"
}
portlek commented 4 years ago

also you can use /fakeplayer menu command to create fakes

portlek commented 4 years ago

the anvil case is asking you for name of the fake player

portlek commented 4 years ago

btw, can you try 1.5 release, here https://github.com/spigotplugins/fakeplayer/releases i need feedback for is it working well or not.

taooceros commented 4 years ago

I will

taooceros commented 4 years ago

I think there is a small mistake, that when I use the 1.5 releases, it says New version found (v1.3) lol.

taooceros commented 4 years ago

There is a bug when the server is enabling the plugin when Fakes.json contains a player.

[FakePlayer] Plugin FakePlayer v1.5 generated an exception while executing task 7
java.lang.IllegalStateException: Asynchronous entity add!
        at org.spigotmc.AsyncCatcher.catchOp(AsyncCatcher.java:15) ~[patched_1.15.2.jar:git-Paper-209]
        at net.minecraft.server.v1_15_R1.WorldServer.addEntity0(WorldServer.java:1222) ~[patched_1.15.2.jar:git-Paper-209]
        at net.minecraft.server.v1_15_R1.WorldServer.addEntity(WorldServer.java:1153) ~[patched_1.15.2.jar:git-Paper-209]
        at io.github.portlek.fakeplayer.nms.v1_15_R1.Util.addEntityToWorld(Util.java:38) ~[?:?]
        at io.github.portlek.fakeplayer.nms.v1_15_R1.NPC.<init>(NPC.java:38) ~[?:?]
        at io.github.portlek.fakeplayer.nms.v1_15_R1.FakeCreated1_15_R1.create(FakeCreated1_15_R1.java:16) ~[?:?]
        at io.github.portlek.fakeplayer.handle.FakeBasic.lambda$spawn$0(FakeBasic.java:76) ~[?:?]
        at java.util.Optional.ifPresent(Optional.java:183) ~[?:?]
        at io.github.portlek.fakeplayer.handle.FakeBasic.spawn(FakeBasic.java:74) ~[?:?]
        at io.github.portlek.fakeplayer.file.FakesFile.lambda$null$1(FakesFile.java:50) ~[?:?]
        at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183) ~[?:?]
        at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195) ~[?:?]
        at java.util.Iterator.forEachRemaining(Iterator.java:133) ~[?:?]
        at java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1801) ~[?:?]
        at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484) ~[?:?]
        at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474) ~[?:?]
        at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150) ~[?:?]
        at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173) ~[?:?]
        at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) ~[?:?]
        at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:497) ~[?:?]
        at io.github.portlek.fakeplayer.file.FakesFile.lambda$onLoad$2(FakesFile.java:49) ~[?:?]
        at org.bukkit.craftbukkit.v1_15_R1.scheduler.CraftTask.run(CraftTask.java:84) ~[patched_1.15.2.jar:git-Paper-209]
        at org.bukkit.craftbukkit.v1_15_R1.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:54) ~[patched_1.15.2.jar:git-Paper-209]
        at com.destroystokyo.paper.ServerSchedulerReportingWrapper.run(ServerSchedulerReportingWrapper.java:22) ~[patched_1.15.2.jar:git-Paper-209]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
        at java.lang.Thread.run(Thread.java:834) [?:?]
taooceros commented 4 years ago

emmm If I don't simply add the name of the fake player after the "fakeplayer name..." it will receive a bug, making me unable to join the server. I think it is possible to add a limit. image

portlek commented 4 years ago

you will remove the fake player name... cases and put your fake player name

portlek commented 4 years ago

ok fixed, try the new release

taooceros commented 4 years ago

Jar does not contain plugin.yml.......

Could not load 'plugins\FakePlayer-1.5.jar' in folder 'plugins'
org.bukkit.plugin.InvalidDescriptionException: Invalid plugin.yml
        at org.bukkit.plugin.java.JavaPluginLoader.getPluginDescription(JavaPluginLoader.java:161) ~[patched_1.15.2.jar:git-Paper-209]
        at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:148) ~[patched_1.15.2.jar:git-Paper-209]
        at org.bukkit.craftbukkit.v1_15_R1.CraftServer.loadPlugins(CraftServer.java:358) ~[patched_1.15.2.jar:git-Paper-209]
        at net.minecraft.server.v1_15_R1.DedicatedServer.init(DedicatedServer.java:234) ~[patched_1.15.2.jar:git-Paper-209]
        at net.minecraft.server.v1_15_R1.MinecraftServer.run(MinecraftServer.java:896) ~[patched_1.15.2.jar:git-Paper-209]
        at java.lang.Thread.run(Thread.java:834) [?:?]
Caused by: java.io.FileNotFoundException: Jar does not contain plugin.yml
        ... 6 more
taooceros commented 4 years ago

Fixed it, you have enter an extra enter in the description part in plugin.yml😂😂😂😂

portlek commented 4 years ago

xd

portlek commented 4 years ago

its working on me, i couldn't find the problem on the file .-.

taooceros commented 4 years ago

image Here, before the "join.', there is an extra enter.

portlek commented 4 years ago

its not like on me idk why yaml configuration puts extra enter

taooceros commented 4 years ago

So Weird lol😮