Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IllegalFormatConversionException when using /gpblockinfo #313

Closed
OffLuffy opened this issue Jul 14, 2018 · 6 comments
Closed

IllegalFormatConversionException when using /gpblockinfo #313

OffLuffy opened this issue Jul 14, 2018 · 6 comments
Labels
🐛Bug Issue is a validated bug report.
Milestone

Comments

@OffLuffy
Copy link

What behaviour is observed:

When using /gpblockinfo with Spigot or PaperMC for 1.12.2, an error is thrown.

What behaviour is expected:

The usual output of /gpblockinfo, saying block you're looking at and holding.

Steps/models to reproduce:

Use /gpblockinfo

Spigot/Craftbukkit/Paper and GriefPrevention version:

Spigot 1.12.2-R0.1-SNAPSHOT / git-Spigot-642f6d2-6103339
PaperMC 1.12.2-R0.1-SNAPSHOT / git-Paper-1481

Stack trace/error

[18:11:28 INFO]: OffLuffy issued server command: /gpblockinfo
[18:11:28 ERROR]: null
org.bukkit.command.CommandException: Unhandled exception executing command 'gpblockinfo' in plugin GriefPrevention v16.8
        at org.bukkit.command.PluginCommand.execute(PluginCommand.java:46) ~[spigot-1.12.2.jar:git-Spigot-642f6d2-6103339]
        at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:141) ~[spigot-1.12.2.jar:git-Spigot-642f6d2-6103339]
        at org.bukkit.craftbukkit.v1_12_R1.CraftServer.dispatchCommand(CraftServer.java:648) ~[spigot-1.12.2.jar:git-Spigot-642f6d2-6103339]
        at net.minecraft.server.v1_12_R1.PlayerConnection.handleCommand(PlayerConnection.java:1397) [spigot-1.12.2.jar:git-Spigot-642f6d2-6103339]
        at net.minecraft.server.v1_12_R1.PlayerConnection.a(PlayerConnection.java:1232) [spigot-1.12.2.jar:git-Spigot-642f6d2-6103339]
        at net.minecraft.server.v1_12_R1.PacketPlayInChat.a(PacketPlayInChat.java:45) [spigot-1.12.2.jar:git-Spigot-642f6d2-6103339]
        at net.minecraft.server.v1_12_R1.PacketPlayInChat.a(PacketPlayInChat.java:1) [spigot-1.12.2.jar:git-Spigot-642f6d2-6103339]
        at net.minecraft.server.v1_12_R1.PlayerConnectionUtils$1.run(SourceFile:13) [spigot-1.12.2.jar:git-Spigot-642f6d2-6103339]
        at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) [?:1.8.0_171]
        at java.util.concurrent.FutureTask.run(Unknown Source) [?:1.8.0_171]
        at net.minecraft.server.v1_12_R1.SystemUtils.a(SourceFile:46) [spigot-1.12.2.jar:git-Spigot-642f6d2-6103339]
        at net.minecraft.server.v1_12_R1.MinecraftServer.D(MinecraftServer.java:748) [spigot-1.12.2.jar:git-Spigot-642f6d2-6103339]
        at net.minecraft.server.v1_12_R1.DedicatedServer.D(DedicatedServer.java:406) [spigot-1.12.2.jar:git-Spigot-642f6d2-6103339]
        at net.minecraft.server.v1_12_R1.MinecraftServer.C(MinecraftServer.java:679) [spigot-1.12.2.jar:git-Spigot-642f6d2-6103339]
        at net.minecraft.server.v1_12_R1.MinecraftServer.run(MinecraftServer.java:577) [spigot-1.12.2.jar:git-Spigot-642f6d2-6103339]
        at java.lang.Thread.run(Unknown Source) [?:1.8.0_171]
Caused by: java.util.IllegalFormatConversionException: d != org.bukkit.Material
        at java.util.Formatter$FormatSpecifier.failConversion(Unknown Source) ~[?:1.8.0_171]
        at java.util.Formatter$FormatSpecifier.printInteger(Unknown Source) ~[?:1.8.0_171]
        at java.util.Formatter$FormatSpecifier.print(Unknown Source) ~[?:1.8.0_171]
        at java.util.Formatter.format(Unknown Source) ~[?:1.8.0_171]
        at java.util.Formatter.format(Unknown Source) ~[?:1.8.0_171]
        at java.lang.String.format(Unknown Source) ~[?:1.8.0_171]
        at me.ryanhamshire.GriefPrevention.GriefPrevention.onCommand(GriefPrevention.java:2649) ~[?:?]
        at org.bukkit.command.PluginCommand.execute(PluginCommand.java:44) ~[spigot-1.12.2.jar:git-Spigot-642f6d2-6103339]
        ... 15 more

GriefPrevention config.yml (if applicable)

Fresh install of GriefPrevention with stock yml

Plugin list (if applicable):

LuckPerms, GlowFeller, WorldEdit, VoidGenerator, CraftingStore, Vault, Multiverse-Core, Essentials, EssentialsChat, EssentialsSpawn, GriefPrevention

@RoboMWM
Copy link

RoboMWM commented Jul 15, 2018

Yea, this likely happened when md_5 made the "1.13" PR (removing/changing deprecated Material ID-based methods for Material enum ones).

@RoboMWM RoboMWM added the 🐛Bug Issue is a validated bug report. label Jul 15, 2018
This was referenced Jul 25, 2018
@Scorpionvssub
Copy link

Scorpionvssub commented Aug 1, 2018

actually that bug has been around since atleast 1.12.2 cause does it there too

@RoboMWM RoboMWM added this to the 16.9 milestone Aug 13, 2018
@RoboMWM
Copy link

RoboMWM commented Aug 17, 2018

Yes, the "1.13-ready PR" was released in 16.8, where he removed a lot of the deprecated block ID usage. This command also used deprecated code iirc? Hence my mention of it being borked in that PR.

@RoboMWM
Copy link

RoboMWM commented Aug 17, 2018

Yea, the string format is expecting a Material Name, Material ID and MaterialData value. Instead just the Material itself, instead of its ID, is being passed as the Material ID.

@Luppyn
Copy link

Luppyn commented May 16, 2023

On GriefPrevention 16.8 for 1.12.2 this error keep going.

[00:20:24] [Server thread/ERROR] [net.minecraft.network.NetHandlerPlayServer]: null
org.bukkit.command.CommandException: Unhandled exception executing command 'gpblockinfo' in plugin GriefPrevention v16.8
at org.bukkit.command.PluginCommand.execute(PluginCommand.java:47) ~[PluginCommand.class:1.12.2-d04e549e]
at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:153) ~[SimpleCommandMap.class:1.12.2-d04e549e]
at org.bukkit.craftbukkit.v1_12_R1.CraftServer.dispatchCommand(CraftServer.java:689) ~[CraftServer.class:1.12.2-d04e549e]
at net.minecraft.network.NetHandlerPlayServer.handleSlashCommand(NetHandlerPlayServer.java:1604) ~[pa.class:?]
at net.minecraft.network.NetHandlerPlayServer.processChatMessage(NetHandlerPlayServer.java:1452) ~[pa.class:?]
at net.minecraft.network.play.client.CPacketChatMessage.processPacket(CPacketChatMessage.java:50) ~[la.class:?]
at net.minecraft.network.play.client.CPacketChatMessage.processPacket(CPacketChatMessage.java:11) ~[la.class:?]
at net.minecraft.network.PacketThreadUtil.lambda$checkThreadAndEnqueue$0(PacketThreadUtil.java:14) ~[hv.class:?]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_292]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_292]
at net.minecraft.util.Util.runTask(SourceFile:529) [h.class:?]
at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:861) [MinecraftServer.class:?]
at net.minecraft.server.dedicated.DedicatedServer.updateTimeLightAndEntities(DedicatedServer.java:461) [nz.class:?]
at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:800) [MinecraftServer.class:?]
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:672) [MinecraftServer.class:?]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_292]
Caused by: java.util.IllegalFormatConversionException: d != org.bukkit.Material
at java.util.Formatter$FormatSpecifier.failConversion(Formatter.java:4302) ~[?:1.8.0_292]
at java.util.Formatter$FormatSpecifier.printInteger(Formatter.java:2793) ~[?:1.8.0_292]
at java.util.Formatter$FormatSpecifier.print(Formatter.java:2747) ~[?:1.8.0_292]
at java.util.Formatter.format(Formatter.java:2520) ~[?:1.8.0_292]
at java.util.Formatter.format(Formatter.java:2455) ~[?:1.8.0_292]
at java.lang.String.format(String.java:2940) ~[?:1.8.0_292]
at me.ryanhamshire.GriefPrevention.GriefPrevention.onCommand(GriefPrevention.java:2649) ~[?:?]
at org.bukkit.command.PluginCommand.execute(PluginCommand.java:44) ~[PluginCommand.class:1.12.2-d04e549e]
... 15 more

@RoboMWM
Copy link

RoboMWM commented May 17, 2023

Use an older version of GriefPrevention for Minecraft 1.12.2...

@GriefPrevention GriefPrevention locked as off-topic and limited conversation to collaborators May 17, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
🐛Bug Issue is a validated bug report.
Projects
None yet
Development

No branches or pull requests

4 participants