Skip to content
This repository has been archived by the owner on Jun 8, 2019. It is now read-only.

/city showの改善 #34

Open
jaotan opened this issue Dec 28, 2017 · 4 comments
Open

/city showの改善 #34

jaotan opened this issue Dec 28, 2017 · 4 comments

Comments

@jaotan
Copy link
Member

jaotan commented Dec 28, 2017

コード修正等を行って年末年始で仕上げたいところだけど出来るかな?
https://pastebin.com/aZ8zsHWg

Discordから、tomachi(#2201)が作成しました。

@book000
Copy link
Member

book000 commented Dec 29, 2017

LOCATION_X, LOCATION_Zとは…?

book000 added a commit that referenced this issue Jan 2, 2018
@book000
Copy link
Member

book000 commented Jan 2, 2018

Caused by: java.lang.StackOverflowError

@book000
Copy link
Member

book000 commented Jan 2, 2018

[07:10:18] [Server thread/INFO]: [0;37;22m[mine_book000: mine_book000 は Tomachi_Station にワープしました][m
[07:10:20] [Server thread/INFO]: mine_book000 issued server command: /city show
[07:10:20] [Server thread/ERROR]: null
org.bukkit.command.CommandException: Unhandled exception executing command 'city' in plugin MyMaid v0.0.1
	at org.bukkit.command.PluginCommand.execute(PluginCommand.java:46) ~[spigot-1.8.8.jar:git-Spigot-21fe707-e1ebe52]
	at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:141) ~[spigot-1.8.8.jar:git-Spigot-21fe707-e1ebe52]
	at org.bukkit.craftbukkit.v1_8_R3.CraftServer.dispatchCommand(CraftServer.java:641) ~[spigot-1.8.8.jar:git-Spigot-21fe707-e1ebe52]
	at net.minecraft.server.v1_8_R3.PlayerConnection.handleCommand(PlayerConnection.java:1162) [spigot-1.8.8.jar:git-Spigot-21fe707-e1ebe52]
	at net.minecraft.server.v1_8_R3.PlayerConnection.a(PlayerConnection.java:997) [spigot-1.8.8.jar:git-Spigot-21fe707-e1ebe52]
	at net.minecraft.server.v1_8_R3.PacketPlayInChat.a(PacketPlayInChat.java:45) [spigot-1.8.8.jar:git-Spigot-21fe707-e1ebe52]
	at net.minecraft.server.v1_8_R3.PacketPlayInChat.a(PacketPlayInChat.java:1) [spigot-1.8.8.jar:git-Spigot-21fe707-e1ebe52]
	at net.minecraft.server.v1_8_R3.PlayerConnectionUtils$1.run(SourceFile:13) [spigot-1.8.8.jar:git-Spigot-21fe707-e1ebe52]
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_151]
	at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_151]
	at net.minecraft.server.v1_8_R3.SystemUtils.a(SourceFile:44) [spigot-1.8.8.jar:git-Spigot-21fe707-e1ebe52]
	at net.minecraft.server.v1_8_R3.MinecraftServer.B(MinecraftServer.java:715) [spigot-1.8.8.jar:git-Spigot-21fe707-e1ebe52]
	at net.minecraft.server.v1_8_R3.DedicatedServer.B(DedicatedServer.java:374) [spigot-1.8.8.jar:git-Spigot-21fe707-e1ebe52]
	at net.minecraft.server.v1_8_R3.MinecraftServer.A(MinecraftServer.java:654) [spigot-1.8.8.jar:git-Spigot-21fe707-e1ebe52]
	at net.minecraft.server.v1_8_R3.MinecraftServer.run(MinecraftServer.java:557) [spigot-1.8.8.jar:git-Spigot-21fe707-e1ebe52]
	at java.lang.Thread.run(Thread.java:748) [?:1.8.0_151]
Caused by: java.lang.StackOverflowError
	at org.bukkit.craftbukkit.v1_8_R3.CraftServer.getWorlds(CraftServer.java:608) ~[spigot-1.8.8.jar:git-Spigot-21fe707-e1ebe52]
	at org.bukkit.Bukkit.getWorlds(Bukkit.java:450) ~[spigot-1.8.8.jar:git-Spigot-21fe707-e1ebe52]
	at xyz.jaoafa.mymaid.Command.Cmd_City.inArea(Cmd_City.java:464) ~[?:?]
	at xyz.jaoafa.mymaid.Command.Cmd_City.inArea(Cmd_City.java:490) ~[?:?]
	at xyz.jaoafa.mymaid.Command.Cmd_City.inArea(Cmd_City.java:490) ~[?:?]
	※この後、at ~が1022行記載される

@book000
Copy link
Member

book000 commented Jan 8, 2018

例えば
inArea(player.getLoc, Set<Loc>, false, 20)->inArea(中略,19)->18
...->0->thrw new IllegalArgumentException("inAreaで再帰しすぎ")
みたいな。?

参考: 再帰関数の末尾再帰(最適化)について

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants