Giter VIP home page Giter VIP logo

dynmapcore's Introduction

Webserver-Plugin for Bukkit (minecraft server mod) that provides HTTP1.1 Service to other Plugins

This Plugin will provide a Webserver, so other Plugin-Developers can use this one instead of program their own, to avoid multiple Webservers running and eating ressources and tcp ports.

dynmapcore's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dynmapcore's Issues

Mods which use illegal extra prefixes cannot have their block and item ID automatically imported

If a mod has an illegal extra prefix (e.g, Lord of the Rings mod has illegal extra prefix which results in block ids such as "lotr:tile.lotr:fruitWood"), then org.dynmap.DynmapCore.addModBlockItemIDs will ignore the blocks, because the name id will split into 3 components.

Though this is an issue that should be corrected by the mod, it would be nice if Dynmap could work around this issue (e.g, only split on the first colon).

Fails to build due to the POM for PermissionsEx being gone

Looks like the POM file for PermissionsEx doesn't exist in the supplied repos in your POM file, which causes builds to fail. I added the following repo to the basic pom.xml which got it to build successfully.

            <repository>
                    <releases>
                    </releases>
                    <snapshots>
                    </snapshots>
                    <id>andune-repo</id>
                    <url>http://andune.com/nexus/content/repositories/releases/</url>
            </repository>

Marker sets with the same label name do not merge together in the icon toggle panel.

@mikeprimm I noticed if you have multiple marker sets with the same label name, it doesn't seem to merge under the same left-hand toggle on the live map. Instead, it create a new dropdown for each set, even with the same name.

Would it be possible to have it so if label names on sets are matching, it merges them together in the toggle? That way you can have different set groups for markers for automated set changes (hiding/changing opacity/changing color) but all set groups still defined under the label "Markers" for a single toggle on the map.

PERFORMANCE SUGGESTION 0: apply LIMIT to SQL where appropriate

For example the §SchemaVersion§ has just 1 column and 1 row. If we know we always want just 1 row in the result set, add §LIMIT§ to the SQL code:

MySQL:

        ResultSet rs = stmt.executeQuery( "SELECT level FROM " + tableSchemaVersion + " LIMIT 1;");

SQLite:

        ResultSet rs = stmt.executeQuery( "SELECT level FROM SchemaVersion LIMIT 1;");

That tells the optimizer and the database to stop looking after finding the only match, which should prevent, or at least avoid many of, the extreme cases where database is looking for the non-existing data for illegally long.

LIMIT applies to

  • SELECT
  • DELETE
  • UPDATE

only.

Mod blocks not rendering

Hello,

Mod blocks on my server don't seem to be rendering, despite the apparent support. A prime example is Biomes O' Plenty (See the screenshot below)

I tried using the latest config files from the github after noticing the included ones were outdated, but it doesn't seem to have made a difference.

Asked on IRC for about 3 days but didn't get any responses, so ticket was last resort really. Any ideas?

Screenshot:
Map:
http://img.ctrlv.in/img/527a138a399e5.jpg

In-Game:
http://img.ctrlv.in/img/527a13aac6bbc.jpg

(Don't worry about the building. That's a different mod which doesn't have support yet, Once I figure out how to do it I'll submit a PR with it though :P

EDIT:
Should mention, I'm using the latest Dynmap & BoP, as well as MCPC+ for 1.6.4

Dynmap 3.0 - Invalid state index 16 for block #

dynmap v3.0-SNAPSHOT-Dev201707090647
Paper dev 1152 (Spigot 1.12)

[07:32:39] [Server thread/WARN]: [dynmap] Invalid state index 16 for block 251
[07:32:39] [Server thread/WARN]: [dynmap] Invalid state index 16 for block 252

Full start-up.

[07:32:39] [Server thread/INFO]: [dynmap] Using PermissionsEx 1.24.0-SNAPSHOT for access control
[07:32:39] [Server thread/INFO]: [dynmap] Mod Support processing completed
[07:32:39] [Server thread/WARN]: [dynmap] Invalid state index 16 for block 251
[07:32:39] [Server thread/WARN]: [dynmap] Invalid state index 16 for block 252
[07:32:39] [Server thread/INFO]: [dynmap] Loaded 23 shaders.
[07:32:39] [Server thread/INFO]: [dynmap] Loaded 82 perspectives.
[07:32:39] [Server thread/INFO]: [dynmap] Loaded 14 lightings.
[07:32:39] [Server thread/INFO]: [dynmap] Web server started on address ip:port
[07:32:39] [Server thread/INFO]: [dynmap] version 3.0-SNAPSHOT-Dev201707090647 is enabled - core version 3.0-SNAPSHOT-Dev201707090646
[07:32:39] [Server thread/INFO]: [dynmap] Loaded 1 maps of world 'world'.
[07:32:39] [Server thread/INFO]: [dynmap] Loaded 1 pending tile renders for world 'world'
[07:32:39] [Server thread/INFO]: [dynmap] World 'world_nether' disabled
[07:32:39] [Server thread/INFO]: [dynmap] World 'world_the_end' disabled
[07:32:39] [Server thread/INFO]: [dynmap] Enabled

Questions on Mod supports

Hi, Mikeprimm!
As wee see, there's a package in DynmapCore which functions to support Forge Mods. But unfortunately, most of those supports wasn't migrated to 1.7 or 1.8. And The incompatibility make the map looks not that nice.
Any Ideas?

Base URL for hotlink

Would it be possible to add two configuration directives to the link component which would be base_url and link_target?

I've framed the dynmap view so that I can display our navigation at the top.
Example

That works perfectly except for the hotlinking feature which I don't want to miss. For the time being I've hacked something together to get it working (for me) but a configuration option would be pretty cool.

I needed to edit the map.js because the base path isn't the same.

This is what I've changed to get it working


EDIT: This is the nginx config I've used, maybe it's useful to someone: NGINX config

JsonFileClientUpdateComponent causing excessive hangups on Spigot 1.11.2 server

Not sure if this is specific to 1.11.2 or 1.11, but I recently noticed the server lagging for about 200ms every second. Upon analysis with the timings command, this method is using a huge amount of CPU.

Running on an i5-2500k with 3GB of RAM to the server, Ubuntu 16.10. Not usually more than 2 people online ever. Spigot version git-Spigot-7d78b81-d5e7885. Using an external webserver (Apache)

This is out of 679s:

2017-01-07

Web map is broken when using advanced configuration. Help needed.

I have two MC Servers, $Vanilla and $Modded.
$Vanilla and $Modded talk to $DatabaseServer for tile storage.
This part seems to be working correctly.
I'm hosting the web/ files from each server in different subfolders on my domain ($Domain.info/Modded and $Domain.info/Vanilla.
The $DatabaseServer is also the web server.

From the Server side, everything appears to be working fine, however the tiles/markers/players don't update.

I'll attach my configs below.
Modded_configuration.txt
Vanilla_configuration.txt

Support for WebP image format

Hello,
I'd like to ask, whether it would be possible to add a new render image format WebP. It's now widely supported by all Chromium browsers and if it would be optional as the jpg format is, it would be quite handy because we would be able to create maps in higher quality with smaller size.
I know that it's not supported by Gecko (Firefox) but it will be hopefully supported soon and it wouldn't be set as the default one.

Thank you for your response.

Missing dependecy

Hello, i currently working on my own minecraft server writen from scratch. I want to port dynmap. But i found, that in repository missing DynmapCore. Please, fix this for me and i will love you <3

When using a reverse web proxy in front of Dynmap, canonical IPv6 format mismatch prevents user matching for web chat.

For example, Apache will forward my IPv6 address using the X-Forwarded-For header. From an IPv6 address, it would encode it in a form such as 2001:db8::1234, but Java's canonical representation of that same address would be 2001:db8:0:0:0:0:0:1234, and Minecraft/Dynmap can't match the logged-in user to the web user, even from the same IPv6 address.

This only happens when an IPv6 quad contains a zero, and Dynmap is trusting X-Forwarded-For (via the trusted-proxies setting in dynmap).

Perhaps the address(es) extracted from X-Forwarded-For could be Java-canoncialized before being stuffed into message.name so that the next block which checks the IP against logins will find matches.

DynmapCore doesn't compile

$ mvn clean compile
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building DynmapCore 1.9.4
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ DynmapCore ---
[INFO] Deleting c:\dev\git\dynmap-bukkit\DynmapCore\target
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ DynmapCore ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 15 resources
[INFO] Copying 605 resources
[INFO]
[INFO] --- maven-compiler-plugin:2.0.2:compile (default-compile) @ DynmapCore ---
[INFO] Compiling 176 source files to c:\dev\git\dynmap-bukkit\DynmapCore\target\classes
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4.289s
[INFO] Finished at: Wed Apr 09 22:13:41 CDT 2014
[INFO] Final Memory: 11M/214M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.0.2:compile (default
-compile) on project DynmapCore: Compilation failure
[ERROR] c:\dev\git\dynmap-bukkit\DynmapCore\src\main\java\org\dynmap\DynmapCore.java:[74,7] error: D
ynmapCore is not abstract and does not override abstract method processSignChange(int,String,int,int
,int,String[],String) in DynmapCommonAPI
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[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 arti
cles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException

Looks like the commit webbukkit/DynmapCoreAPI@2b88559 in DynmapCoreAPI added a method and it was never implemented in DynmapCore. Then later in dynmap you try to use it. Was a commit missed for DynmapCore?

Undefined variable: prefx in .../standalone/tiles.php on line 53

PHP message: PHP Notice: Undefined variable: prefx in .../standalone/tiles.php on line 53

I was getting this error while tiles would not appear when using nginx as a standalone web server. correcting the typo to 'prefix' corrected the issue and tiles now appear.

Returning to default map

Would it be possible to stay at the current location after polling updates?

I often (~3 times in a minute) have to load/unload a world. During those operations, dynmap kicks out all viewers to the default map. (Even when worlds.yml is set "enable: false")

For example:
Somebody is looking at map "A".
When I load world "B" (/multiverse load B), doesn't matter if "enable" is set to true or false, all viewers that were in "A" map get kicked out to default map with default zoom.

Mod Support

Hello,

I’m from the Minecraft Teachers community, a google group for the MinecraftEdu mod. Many teachers have began using Minecraft in school with this mod because it makes running a classroom server very easy. We were excited to find your Dynmap mod as it would make things much easier to see everyone on the map at once, and the web chat would save hours of going through server logs. Since the Edu mod has Forge built in we thought Dynmap would work fine. It did initially but as soon as we try to change any settings we get the “black screen of death”. This is most likely due to the fact that the Edu mod changes the standard world name, it reads like a path.

/dmap worldlist command shows no worlds are loaded, e.g.:
world ..worlds-tmpworld: loaded=false, enabled=true etc.

I wouldn’t normally bother you with this since it’s clearly not your mod that is the problem. The problem is we can’t use your mod! :(
I am not a mod programmer myself, but I am a developer and no stranger to java. Because this would be so useful to teachers, I am considering trying to fix the problem for a special Edu version. I thought I should ask you first though…maybe you could help?
We are using:
Minecraft 1.6.4
Forge 9.11.1.0
Dynmap-1.9-forge-9.10.0

Do you think it would be possible (as in not terribly difficult) to change how Dynmap load worlds to match the Edu mods structure?
If you have time to help with this we would really appreciate it!
Thank you,
Maize

Ps. I know this should be under Dynmap Forge section...I'm not sure how I ended up in DynmapCore

ModModelDefinitionImpl nullpointer exception

I'm currently trying to get Dynmap to work with a modpack but it crashes when Dynmap enters ModModelDefinitionImpl. It happens after it says it's processing "Placeable Items version null" but all other mods before that also had version null and since it happens when ModSupportImpl.complete is called I assume it's not because of this specific mod. I'll remove Placeable Items and retry and post my findings once I get home.
I'm using:
DynmapBlockScan-3.0-alpha-1-forge-1.12.2 (23-Aug-2018)
Dynmap-HEAD-forge-1.12.2 (23-Aug-2018)
As a side note I noticed that Dynmap-3.0-alpa is no longer on http://www.dynmap.us/builds/DynmapForge/ and there is no DeanmapBlockScan-HEAD version

crashreport

Poor performance with lots of markers

We have a skyblock world with hundreds of islands and we are displaying a marker for every island. This causes the map to be very unresponsive and even taking multiple seconds to display. Maps without that many markers load without any delay.

I think that this could be fixed by not displaying markers that are outside of the viewport (that is, not even adding them to the DOM). It would also be useful if there was an option to only show certain markers at a certain zoom level.

Add own php

Does anyone know how I can add my own php code to dynmap on my bukkit server. If I rename index.html to index.php or add a php file to web directory ist doesnt interpret the php code.

Some lighting presets may be missing important key:value

A friend noticed that he couldn't get "brightnight-smooth" lighting preset to work for him. He wanted to have a night-time version of the map.

I also tried it and couldn't get it to work. I then tried all the other night variants, and they wouldn't work either. The only way I was able to get a night version of the map, is when I used a day-night lighting preset, that would allow the map to switch from day to night tiles.

I started poking around code on git and I noticed this line:

https://github.com/webbukkit/DynmapCore/blob/master/src/main/java/org/dynmap/hdmap/ShadowHDLighting.java#L39

That made me want to try editing the configuration.txt file and change the following line from true to false, as a test:
use-brightness-table: false

That seemed to do the trick, all the night lighting presets worked.

Not understanding exactly what that setting does, I was hesitant to just change it and leave it, thinking that it may affect other maps, without me noticing the change right away. So I then decided to try editing lighting.txt file, and included

use-brightness-table: false

... on all the night view presets. That also worked.

From there I reverted the lighting.txt file, knowing that the file really shouldn't be edited (in case of future update changes)... and I set about adding a night-time preset to the custom-lighting.txt. Again, that also worked.

This leads me to think that maybe you forgot to add that line to the night-view presets in the lighting.txt preset file, and that there is no problems/bugs in the actual code. Since, I'm assuming, configuration.txt should probably leave that value set to true.

FWIW, I didn't test all versions of Dynmap. I've only tried this on the Forge version, so I'm not sure if this problem would show up for other users, using other versions, but I'm guessing it might.

gzip for update xhr calls?

Is there any way to configure jetty to compress the /up responses (which are only text) with gzip?

They're the biggest and slowest calls on the page, and I know it only happens a few times a second, but we could achieve notable compression with gzip.

Most browsers will send these headers along which, if we can modify jetty here, should make this pretty easy:

Accept: application/json
Accept-Encoding: gzip, deflate

I'm not a Java dev so please forgive me, but I found this old article which could demonstrate how to enable gzip compression if we're actually able to configure it at all: https://blog.max.berger.name/2010/01/jetty-7-gzip-filter.html

MySQL V5.5.45&up + Dynmap 2.5 = SSL Errors

Hello!

I recently upgraded my Debian machine from MySQL 5.5 to 5.7.19;

Since that update my console log in Spigot/Bukkit has been slowly flowing with MySQL connection errors.

[06:39:44] [Dynmap Render Thread/WARN]: Thu Sep 07 06:39:44 PDT 2017 WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn't set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to 'false'. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification.

I do not wish to use SSL for the connection to my DB, but nonetheless, as stated in the error, after MySQL version 5.5.45, if the ssl argument is not explicitly called, the connection throws warnings.
I was looking over the code and it seems something on one of these lines...
https://github.com/webbukkit/DynmapCore/blob/master/src/main/java/org/dynmap/storage/mysql/MySQLMapStorage.java#L289
https://github.com/webbukkit/DynmapCore/blob/master/src/main/java/org/dynmap/storage/mysql/MySQLMapStorage.java#L516

To make a suggestion, would it be possible to add a parameter to the configuration.txt file ( https://github.com/webbukkit/dynmap/blob/master/src/main/resources/configuration.txt )
Such as a boolean "sslenabled" true/false under storage for mysql? (Optionally verify cert if sslenabled=true?)

and for the jdbc uri in the MySQLMapStorage.java file, an option appended to the connection string such as verifyServerCertificate=false or useSSL=[false|true]
to account for self signed or even whether or not to use ssl.

Error given for setting world order is misleading.

I was just trying to set the world order on one of my servers, and ran across what seemed like an odd error. I ran the command /dmap worldset dim1 order:3, and it gave me an error message relating to the center of the world:

Cannot set center on disabled or undefined world

Didn't make sense to me as I was not fidgeting with the map center at all, I just don't care for the extra dimensions from the FTB pack I'm running being sorted above the standard Minecraft dimensions.

Upon running the error through Google, I found that I had mistyped the world name. I found the error message in DynmapMapCommands.java, and I figure that when it was being refactored you copied/pasted the block but forgot to change the message given for setting the world order on line 249. I forked, and will submit a PR shortly. I would suggest making a note in the error messages regarding the fact that the issue could be due to a misspelled dimension name as the current message could seem vague to a user, but I will leave that up to you unless you want me to work on it.

Lower thread pool timeout

ExecutorThreadPool pool = new ExecutorThreadPool(2, maxconnections, 60, TimeUnit.SECONDS, queue);

I noticed in debugger that I had a ton of "etp" threads. Traced it down to jetty from dynmap.

The code times them out in 60 seconds, but I'm afraid that each thread is eventually popping 1 task off within that 60 seconds to keep each thread alive. I do not see threads closing....

suggest dropping it to like 1-5 seconds so that they can close and only open on burst traffic.

Prerequisite for calling chunk cache

I did my own plugin implementation for remote server render. I implemented almost everything, but still dynmap-core not calling my createMapChunkCache. What could I do wrong?

My current map looks like that http://i.imgur.com/gjKOEYa.png
TimeUpdate - DONE
PlayerUpdate - DONE
WorldUpdate - DONE

Question: Usage through External Project

How might I get player info in an external project? (By which I mean it doesn't have any Bukkit or Spigot related stuff on it and it's just a java project with nothing about Minecraft on it)
Can I just enter the url to an already made dynmap and access player names and live coordinates?

Possible bug in BukkitVersionHelperGeneric?

Hey there!

I was trying to get Dynmap to render a biome overview and noticed some of the new (mutated) ones were just being grey as if they weren't properly recognized. I've traced the possible error back to BukkitVersionHelperGeneric - biomebasearray does not seem to have been initialized at all - which prevented getPrivateField(...) from accessing the "biome" property of CraftChunkSnapshot.

I was able to fix this by going to line 111

/* CraftChunkSnapshot */
craftchunksnapshot = getOBCClass("org.bukkit.craftbukkit.CraftChunkSnapshot");
ccss_biome = getPrivateField(craftchunksnapshot, new String[] { "biome" }, biomebasearray);

and adding a few lines of code as follows

/* CraftChunkSnapshot */
craftchunksnapshot = getOBCClass("org.bukkit.craftbukkit.CraftChunkSnapshot");

Class<?> bbaseClass = getNMSClass("net.minecraft.server.BiomeBase");
biomebasearray = (java.lang.reflect.Array.newInstance(bbaseClass, 1)).getClass();

ccss_biome = getPrivateFieldNoFail(craftchunksnapshot, new String[] { "biome" }, biomebasearray);

Dunno, maybe you can use this information somehow which is why I thought I'd open a ticket here. (:

Regards,
Matthias

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.