Invalid characters in region names.
apengstrom opened this issue ยท 16 comments
A few of my users have experienced problems managing plots. The reason is because WorldGuard does not allow creation of plots with certain special characters in the name. I believe it needs to be alphanumeric. This time, one of my users tried to put a period in the plot name. The plot was created and manageable except for the region. The region did not exist properly. We should set it so only alphanumeric characters can be used in region names when creating towns, plots, etc. Obviously spaces would be replaced with underscore (I think they are already.. not sure).
Thanks!
I'll admit, I didn't know WorldGuard had that limitation. This will be fixed in 2.4.0, and will be with the next round of bug fixes in the LTS version.
Meaning it showed up in the list of plots for the town but the world guard region did not exist. Thanks!
EDIT: Additionally, the user who tried to buy the plot afterward (by clicking on the sign) had their money taken from them but they couldn't buy the plot. The money disappeared, the town owner did not see it get put into the town bank at all. I had to give the guy money manually with economy commands.
Did any of this cause console output?
If the WG region didn't exist, then I'm surprised anything happened at all, aside from a stack trace printing to the log. I'll have to look through the code to see what happened.
One of the problems that MCTowns has had for a while is that if you delete a WG region that MCTowns was relying on, or it doesn't get created or is missing for any reason, things tend to start freaking out, for lack of a technical description. This is totally my fault- initially, I had always been coding under the assumption that if I made a WG region, it would get made and stay made (i.e. people wouldn't delete it themselves, etc).
The situation should be improved a lot in the LTS- you should be able to safely delete plots and territories whose WG regions have been deleted manually (or never got made). (Can you confirm that you can do this?) I'll continue to improve the situation in future versions.
Changes implemented in 7661b57, now verifying fix.
I am looking to respond on the last two tickets I made, soon. Just pulled down the branch for the region naming issue and I am gonna compile it and try it soon. For faster testing it may help if you email me a compiled version of the code. I don't have this project set up for development so its harder for me to get it compiled at this point.
[email protected], for future reference. Thanks. I'll let you know if I can get this compiled and working on the server, either tonight or tomorrow.
MCTowns uses Maven, so you should be able to compile any of this just by running:
git clone https://github.com/jmhertlein/MCTowns.git
cd MCTowns
mvn package
Then look in the directory named 'target' for the JAR file.
Strange.. any thoughts?
[INFO] Error stacktraces are turned on.
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building MCTowns 2.3.0-LTS
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ MCTowns ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 6 resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ MCTowns ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 32 source files to /path/to/file/MCTowns/target/classes
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.975s
[INFO] Finished at: Thu Dec 26 08:34:33 EST 2013
[INFO] Final Memory: 5M/81M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project MCTowns: Fatal error compiling: invalid target release: 1.7 -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project MCTowns: Fatal error compiling
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:216)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:317)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:152)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:555)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:214)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:158)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: org.apache.maven.plugin.MojoExecutionException: Fatal error compiling
at org.apache.maven.plugin.compiler.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:796)
at org.apache.maven.plugin.compiler.CompilerMojo.execute(CompilerMojo.java:129)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:106)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
... 19 more
Caused by: org.codehaus.plexus.compiler.CompilerException: invalid target release: 1.7
at org.codehaus.plexus.compiler.javac.JavaxToolsCompiler.compileInProcess(JavaxToolsCompiler.java:191)
at org.codehaus.plexus.compiler.javac.JavacCompiler.performCompile(JavacCompiler.java:169)
at org.apache.maven.plugin.compiler.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:785)
... 22 more
Caused by: java.lang.IllegalArgumentException: invalid target release: 1.7
at com.sun.tools.javac.main.RecognizedOptions$GrumpyHelper.error(RecognizedOptions.java:75)
at com.sun.tools.javac.main.RecognizedOptions$14.process(RecognizedOptions.java:380)
at com.sun.tools.javac.api.JavacTool.processOptions(JavacTool.java:247)
at com.sun.tools.javac.api.JavacTool.getTask(JavacTool.java:207)
at com.sun.tools.javac.api.JavacTool.getTask(JavacTool.java:53)
at org.codehaus.plexus.compiler.javac.JavaxToolsCompiler.compileInProcess(JavaxToolsCompiler.java:115)
... 24 more
[ERROR]
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
I'll see if I can set up a Jenkins CI server for anyone wanting to test the dev branch.
Ok. I appreciate it! :) soon as I can get that build I'll test it and get back to you on all the tickets.
Do you have the java 7 JDK installed?
javac -version
Should print out "1.7" somewhere in the output..
That would be why. I run javac 1.6.0_65 for other purposes. I've had issues with this macbook and multiple java versions. I'm not sure if I can install java 7 without causing complications.
I've set up a Jenkins server here: http://jmhertlein.net:8080/job/MCTowns/lastBuild/net.jmhertlein$MCTowns/
Just click on the .jar under "Build Artifacts" to download it.
I was able to test this with the name "test.plotname" for a plot, and it works. Thanks!
Sorry, I also just realized I closed and it is not marked as fixed. I'm used to SVN / Assembla, git is new to me so sorry if I messed that up. If I verify a fix and its complete, should I close or should I just follow up? Thanks