CraftBook 3

CraftBook 3

139k Downloads

SignChangeEvent to CraftBook v1766-a771ff8

LadyCailinBot opened this issue · 41 comments

commented

CRAFTBOOK-2419 - Reported by Martin.Faester

21:08:48 [SEVERE] Could not pass event SignChangeEvent to CraftBook v1766-a771ff8
org.bukkit.event.EventException
at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:427)
at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62)
at org.bukkit.plugin.TimedRegisteredListener.callEvent(TimedRegisteredListener.java:35)
at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:477)
at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:462)
at net.minecraft.server.v1_4_R1.PlayerConnection.a(PlayerConnection.java:1377)
at net.minecraft.server.v1_4_R1.Packet130UpdateSign.handle(SourceFile:46)
at net.minecraft.server.v1_4_R1.NetworkManager.b(NetworkManager.java:290)
at net.minecraft.server.v1_4_R1.PlayerConnection.d(PlayerConnection.java:113)
at net.minecraft.server.v1_4_R1.ServerConnection.b(SourceFile:39)
at net.minecraft.server.v1_4_R1.DedicatedServerConnection.b(SourceFile:30)
at net.minecraft.server.v1_4_R1.MinecraftServer.r(MinecraftServer.java:598)
at net.minecraft.server.v1_4_R1.DedicatedServer.r(DedicatedServer.java:224)
at net.minecraft.server.v1_4_R1.MinecraftServer.q(MinecraftServer.java:494)
at net.minecraft.server.v1_4_R1.MinecraftServer.run(MinecraftServer.java:427)
at net.minecraft.server.v1_4_R1.ThreadServerApplication.run(SourceFile:849)
Caused by: java.lang.NullPointerException
at com.sk89q.craftbook.LanguageManager.getString(LanguageManager.java:82)
at com.sk89q.craftbook.bukkit.BukkitPlayer.printError(BukkitPlayer.java:65)
at com.sk89q.craftbook.MechanicManager.dispatchSignChange(MechanicManager.java:154)
at com.sk89q.craftbook.bukkit.MechanicListenerAdapter$MechanicBlockListener.onSignChange(MechanicListenerAdapter.java:181)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:425)
... 15 more

commented

Comment by Martin.Faester

attached report.txt

commented

Comment by me4502

Have you set it to use a language that you don't have on the server? That's the only possible way to get this error. By setting a language in the config that you don't have a physical file for.

commented

Comment by Martin.Faester

i have set it to danish and translated an english file to danish. So i have the file, but it doesnt accept it then.

commented

Comment by Martin.Faester

The danish language is named da_DK.txt exactly as the english is called en_US.txt, and set language=da.DK.txt in config

commented

Comment by me4502

It should be da_DK, and you need to add it to your languages also then. Not just language.

Also, the config shouldn't have .txt

commented

Comment by me4502

Can you do /cb report -p?

commented

Comment by Martin.Faester

Sure. http://pastebin.com/vcfq4Jb7

commented

Comment by me4502

Yeah, it says languages in the config just contains en_US. If it exists, add your language, if it doesn't exist. Create it.

It's laid out as,

languages:

  • 'en_US'
  • 'da_DK'
commented

Comment by Martin.Faester

But you have seen the config file, and there is

The default language for CraftBook.

language: da_DK
and the file is present in the folder. There has been a reload and a server restart. What more can i do?

commented

Comment by Martin.Faester

NB. im in town an hour or two, then turning back here..

commented

Comment by Martin.Faester

So, i don't get this problematic around setting the language. I do need a file called the same as mentioned in config, or do i have to fill the english file with danish then? For me, it looks like its getting the config language wrong or readed from another config not mentioned here.

commented

Comment by Martin.Faester

Why does the report say en_US when there is da_DK in the config? Craftbook is not reading this at all. (clean install).

commented

Comment by Martin.Faester

But now i have found a difference in my own and the standard eng file. The En_US file has LF and mine has CR LF. Possible only difference.

commented

Comment by Martin.Faester

With this corrected, it is still using english no matter what.

commented

Comment by me4502

There are 2 language options. One is all available languages, the other is default. The one that's supposed to be used is the other one, and I explained how to use it already

commented

Comment by me4502

This issue will be closed if no reply is given within 24 hours.

commented

Comment by Martin.Faester

"me4502" is not getting my point at all. I belive, i have done everything i can in order to make this work. Will you please consider your plugin bugged or tell me, you have examples of users having this working correctly?
(I do know how to program a plugin, but this is really not working).

commented

Comment by me4502

As I have said numerous times, there are 2 language options. One is all available languages and one is default. The default language MUST be there for it to be used.

Edit: list of languages is the "languages" config node, and default is "language" config node.

Edit: The plugin is not bugged, hundreds of users are using it perfectly, and I am able to use it on my test server.

commented

Comment by Martin.Faester

When you say "default lang must be there", do you mean the file or the language=en_us must be present beside other language=xx ? Because the file is there, and not removed or changed.

commented

Comment by me4502

By there, I mean the other language option, "languages".

commented

Comment by Martin.Faester

I don't have other options than:

The default language for CraftBook.

language: da_DK

I assume i can add it, if you tell me what to set in there.

commented

Comment by me4502

You should have it, and if you don't it means your running an old version of WorldEdit.

It should currently say:

languages:

  • "en_US"
commented

Comment by Martin.Faester

WorldEdit version 5.5.1

commented

Comment by Martin.Faester

1)There shall be no file extension on this one?
2)When you say "add it to my languages" you mean add the text "language: da_DK" to config?

commented

Comment by me4502

Never mind what I just said, pastebin your config, and I will change the language bit to fix it for you.

commented

Comment by Martin.Faester

Thanks mate!
http://pastebin.com/gtbMVEpL

commented

Comment by Martin.Faester

probably craftbook doesn't like danish characters, i have seen this before. But saving as ansii sometimes helps.
Btw. I have sent the DK file to wiki and added it there. It is newer than the one attached here. http://pastebin.com/raw.php?i=AidWSKi5

commented
commented

Comment by me4502

thats fixed config.

commented

Comment by Martin.Faester

well, but it is not reading it. All text is stil english. "Gate created" etc.

commented

Comment by Martin.Faester

NB Can somebody look into using danish æøå in the dk-DK file? I still do not have an answere at file extension for the language file, but txt?

commented

Comment by me4502

Yes, it's ,txt

Exactly the same as the en_US in the folder.

commented

Comment by Martin.Faester

I have changed the 3 letters in the DK file to acceptable signs, but it still types gate created when it should say "port oprettet". The dk_DA file (dk_da.txt) is not detected.

commented

Comment by me4502

Where is the file? What's it called? Do you use /reload? What craftbook are you running? What bukkit are you running?

commented

Comment by Martin.Faester

File plugins/craftbook/da_DK.txt , config=language: da_DK
CraftBook v3.5.3 for CB 1.4.7-R1.0 Feb 03, 2013
bukkit version git-Bukkit-1.4.7-R1.0-b2624jnks (MC: 1.4.7) (Implementing API version 1.4.7-R1.0)
Yes, i do reload. I have best experiense with restarting the server rather then reloading the plugin. It is just using english though.

commented

Comment by me4502

Never use /reload, it breaks plugins and corrupts stuff. But as for this issue, have you added it to your 'languages' field in the config?

commented

Comment by Martin.Faester

This is default config of the Worldedit 552 file:

There is nowhere here saying anything about language?

limits:
allow-extra-data-values: false
max-blocks-changed:
default: -1
maximum: -1
max-polygonal-points:
default: -1
maximum: 20
max-radius: -1
max-super-pickaxe-size: 5
max-brush-radius: 5
butcher-radius:
default: -1
maximum: -1
disallowed-blocks: [6, 7, 14, 15, 16, 26, 27, 28, 29, 39, 31, 32, 33, 34, 36, 37, 38, 39, 40, 46, 50, 51, 56, 59, 69, 73, 74, 75, 76, 77, 81, 83]

use-inventory:
enable: false
allow-override: true
creative-mode-overrides: false

logging:
log-commands: false
file: worldedit.log

super-pickaxe:
drop-items: true
many-drop-items: false

snapshots:
directory:

navigation-wand:
item: 345
max-distance: 100

scripting:
timeout: 3000
dir: craftscripts

saving:
dir: schematics

files:
allow-symbolic-links: false

history:
size: 15
expiration: 10

wand-item: 271
shell-save-type:
no-double-slash: false
no-op-permissions: false
debug: false

commented

Comment by me4502

It's in the craftbook config, not WorldEdit...

commented

Comment by Martin.Faester

Now it works with danish language! Hurrayy. Thanks for your help.

commented

Comment by me4502

You're welcome