Closed deadman96385 closed 2 years ago
So we have gotten pretty far with trying to solve this issue but mytown is now throwing an error we can't solve
Protection File
{
"modid": "quiverchevsky",
"segments": [
{
"class": "com.domochevsky.quiverbow.projectiles.OWR_Shot",
"type": "entity",
"actions": "TRACKED",
"flags": "EXPLOSIONS",
"owner": [
{
"element": "func_147468_f",
"type": "METHOD"
}
],
"range": 15
}
]
}
Error on /townadmin config reload
[13:47:49 INFO]: ------------------------------------------------------------
[13:47:49 ERROR]: mytown.util.exceptions.SegmentException: [Segment: class com.domochevsky.quiverbow.projectiles.OWR_S
hot] The segment does not have a valid flag!
at mytown.protection.json.ProtectionTypeAdapter.read(ProtectionTypeAdapter.java:395)
at mytown.protection.json.ProtectionTypeAdapter.read(ProtectionTypeAdapter.java:29)
at com.google.gson.Gson.fromJson(Gson.java:803)
at com.google.gson.Gson.fromJson(Gson.java:741)
at mytown.protection.json.ProtectionParser.start(ProtectionParser.java:56)
at mytown.MyTown.loadConfigs(MyTown.java:192)
at mytown.commands.CommandsAdmin.configReloadCommand(CommandsAdmin.java:73)
at sun.reflect.GeneratedMethodAccessor101.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at mypermissions.command.CommandTreeNode.commandCall(CommandTreeNode.java:72)
at mypermissions.command.CommandTree.commandCall(CommandTree.java:39)
at mypermissions.command.CommandModel.func_71515_b(CommandModel.java:46)
at net.minecraft.command.CommandHandler.func_71556_a(CommandHandler.java:99)
at org.bukkit.craftbukkit.v1_7_R4.command.CraftSimpleCommandMap.dispatch(CraftSimpleCommandMap.java:51)
at org.bukkit.craftbukkit.v1_7_R4.CraftServer.dispatchVanillaCommand(CraftServer.java:733)
at org.bukkit.craftbukkit.v1_7_R4.CraftServer.dispatchServerCommand(CraftServer.java:701)
at net.minecraft.server.dedicated.DedicatedServer.func_71333_ah(DedicatedServer.java:473)
at net.minecraft.server.dedicated.DedicatedServer.func_71190_q(DedicatedServer.java:432)
at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:809)
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:669)
at java.lang.Thread.run(Thread.java:745)
[13:47:49 ERROR]: Segment will NOT be added, reload configs to try again.
[13:47:49 ERROR]: [Segment: class com.domochevsky.quiverbow.projectiles.OWR_Shot] Segment was not properly initialized
!
[13:47:49 INFO]: ------------------------------------------------------------
You are using the new protection syntax. use instead of actions
,
entityType
and instead of flags
, flag
On Wed, Oct 21, 2015 at 8:48 PM, Sean Hoyt notifications@github.com wrote:
So i have gotten pretty far but mytown is now throwing an error we can't solve
Protection File
{ "modid": "quiverchevsky", "segments": [ { "class": "com.domochevsky.quiverbow.projectiles.OWR_Shot", "type": "entity", "actions": "TRACKED", "flags": "MODIFY", "owner": [ { "element": "func_147468_f", "type": "METHOD" } ], "range": 15 } ] }
Error on /townadmin config reload
[13:47:49 ERROR]: mytown.util.exceptions.SegmentException: [Segment: class com.domochevsky.quiverbow.projectiles.OWR_S hot] The segment does not have a valid flag! at mytown.protection.json.ProtectionTypeAdapter.read(ProtectionTypeAdapter.java:395) at mytown.protection.json.ProtectionTypeAdapter.read(ProtectionTypeAdapter.java:29) at com.google.gson.Gson.fromJson(Gson.java:803) at com.google.gson.Gson.fromJson(Gson.java:741) at mytown.protection.json.ProtectionParser.start(ProtectionParser.java:56) at mytown.MyTown.loadConfigs(MyTown.java:192) at mytown.commands.CommandsAdmin.configReloadCommand(CommandsAdmin.java:73) at sun.reflect.GeneratedMethodAccessor101.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at mypermissions.command.CommandTreeNode.commandCall(CommandTreeNode.java:72) at mypermissions.command.CommandTree.commandCall(CommandTree.java:39) at mypermissions.command.CommandModel.func_71515_b(CommandModel.java:46) at net.minecraft.command.CommandHandler.func_71556_a(CommandHandler.java:99) at org.bukkit.craftbukkit.v1_7_R4.command.CraftSimpleCommandMap.dispatch(CraftSimpleCommandMap.java:51) at org.bukkit.craftbukkit.v1_7_R4.CraftServer.dispatchVanillaCommand(CraftServer.java:733) at org.bukkit.craftbukkit.v1_7_R4.CraftServer.dispatchServerCommand(CraftServer.java:701) at net.minecraft.server.dedicated.DedicatedServer.func_71333_ah(DedicatedServer.java:473) at net.minecraft.server.dedicated.DedicatedServer.func_71190_q(DedicatedServer.java:432) at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:809) at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:669) at java.lang.Thread.run(Thread.java:745)
[13:47:49 ERROR]: Segment will NOT be added, reload configs to try again. [13:47:49 ERROR]: [Segment: class com.domochevsky.quiverbow.projectiles.OWR_Shot] Segment was not properly initialized !
— Reply to this email directly or view it on GitHub https://github.com/MyEssentials/MyTown2-Protections/issues/107#issuecomment-149975223 .
Ok so it now runs but once we block a function it crashes the server what would be the best way to get the element that needs to be blocked so that the bullet does not break blocks we are currently using the latest quiverbow (April 27th) http://minecraft.curseforge.com/projects/quiverbow?gameCategorySlug=mc-mods&projectID=73811#c18
The protection file we currently have is
{
"modid": "quiverchevsky",
"segments": [
{
"class": "com.domochevsky.quiverbow.projectiles.OWR_Shot",
"type": "entity",
"entityType": "TRACKED",
"flag": "EXPLOSIONS",
"owner": [
{
"element": "func_70106_y",
"type": "METHOD"
}
],
"range": 70
}
]
}
This is the crash log:
[23:34:59 ERROR]: Encountered an unexpected exception
java.lang.NullPointerException
at mytown.protection.segment.getter.Getters.getValue(Getters.java:184) ~[Getters.class:?]
at mytown.protection.segment.SegmentEntity.getOwner(SegmentEntity.java:37) ~[SegmentEntity.class:?]
at mytown.protection.Protection.checkEntity(Protection.java:114) ~[Protection.class:?]
at mytown.protection.Protections.worldTick(Protections.java:128) ~[Protections.class:?]
at cpw.mods.fml.common.eventhandler.ASMEventHandler_155_Protections_worldTick_WorldTickEvent.invoke(.dynamic) ~[
?:?]
at cpw.mods.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:54) ~[ASMEventHandler.class:1.7.
10-1492.152]
at cpw.mods.fml.common.eventhandler.EventBus.post(EventBus.java:138) ~[EventBus.class:1.7.10-1492.152]
at cpw.mods.fml.common.FMLCommonHandler.onPreWorldTick(FMLCommonHandler.java:272) ~[FMLCommonHandler.class:1.7.1
0-1492.152]
at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:925) ~[MinecraftServer.class:?]
at net.minecraft.server.dedicated.DedicatedServer.func_71190_q(DedicatedServer.java:431) ~[lt.class:?]
at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:809) ~[MinecraftServer.class:?]
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:669) [MinecraftServer.class:?]
at java.lang.Thread.run(Thread.java:745) [?:1.8.0_45]
it's okay to use flags but that's not the problem for some reasons I couldn't find any protection file with that line "entityType": "TRACKED", can you please explain more what we should put in that line? and why we use entitytype?
also, not only Obsidian Wither rifle does the grief and breaking blocks part only, most like all bows can break glasses, glowstone and other items.
entityType
simply got changed to actions
in the later versions, there's no difference between them other than one working for earlier versions and the other for newer versions. Right now actions
is the keyword you want to use.
Currently all QuiverBow weapons that do block damage are blocked in towns but the Obsidian Wither rifle does damage to blocks my guess it is because it is not declared in explosion like the others.