Giter Site home page Giter Site logo

abelkrijgtalles / mojang-maps Goto Github PK

View Code? Open in Web Editor NEW
7.0 7.0 1.0 489 KB

A Google Maps like navigation system for Minecraft.

Home Page: https://mojangmaps.abelkrijgtalles.nl

License: GNU General Public License v3.0

Java 100.00%
bukkit java minecraft paper spigot

mojang-maps's Introduction

Projects I've finished:

Top Langs

"It would be easier to design my own cpu and bios and create my own OS than learning the basics of a boot sector and other things."

GPG Public Key

mojang-maps's People

Contributors

abelkrijgtalles avatar ajh123 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

ajh123

mojang-maps's Issues

[BUG] Player gets sent empty actionbar message when not over a road.

When a player moves and they are not over a road they get sent an empty actionbar message, this results in any other actionbar messages being overridden.

The problematic code is:

p.spigot().sendMessage(ChatMessageType.ACTION_BAR, new TextComponent(RoadUtil.getLocationMessage(p)));

A simple fix would be:

String roadMsg = RoadUtil.getLocationMessage(p); // ask the RoadUtil for the location message
if (roadMsg != "") { // check if the message is not empty
       p.spigot().sendMessage(ChatMessageType.ACTION_BAR, new TextComponent(roadMsg)); // send the message like before
}

or you could read the action bar by using packets and let other actionbar messages take priority.

[Feature/Bug]: Allow to specify multiple lanes for a road.

Some roads may be more complicate than others, for example:
image

Using a command like /createroad Main_Street -129 -5 524 -129 -4 439 -129 -4 374 -133 -4 364 -137 -3 355 -139 -3 350 -139 -3 276 -129 -3 263 -129 -2 210 won't be enough because for some lanes the actionbar at the bottom believes your not on a road (because its too wide).

Maybe we can create an empty road like /createroad Main_Street then use /addlane Main_Street TYPE -129 -5 524 -129 -4 439 -129 -4 374 -133 -4 364 -137 -3 355 -139 -3 350 -139 -3 276 -129 -3 263 -129 -2 210. The TYPE parameter could be "Driving" or "Walking", it won't serve much use now, however, it will be beneficial to differentiate the types of a lane (could be useful for a Web UI in the future or other plugins that want to extend MojangMaps). In addition some servers may have a vehicle mod installed (like I do) so speficiying the type of the lane would mean you won't get people being told to walk in the middle of a road.

Using the hypothetical /addlane will mean we can define multiple lanes which we can class as the same road.

Languages with xx-XX codes can't be used

These are the current languages that can't be used by that error

  • Spanish
  • Latin
  • Portuguese, Brazilian
  • Portuguese
  • Swedish
  • Chinese Simplified
  • Chinese Traditional
    This is because Mojang Maps tries to download https://raw.githubusercontent.com/Abelkrijgtalles/mojang-maps-data/main/xx-XX/xx-XX.json instead of https://raw.githubusercontent.com/Abelkrijgtalles/mojang-maps-data/main/la-LA/la.json
    This results in this error:
    Could not download file from https://raw.githubusercontent.com/Abelkrijgtalles/mojang-maps-data/main/xx-XX/xx-XX.json to plugins\MojangMaps\messages.json.
    The code that is responsible for this error is:
    HTTPUtil.DownloadFile("https://raw.githubusercontent.com/Abelkrijgtalles/mojang-maps-data/main/%s/%s.json".formatted(languageCode, languageCode), String.valueOf(Paths.get(String.valueOf(Bukkit.getServer().getPluginManager().getPlugin("MojangMaps").getDataFolder()), "messages.json")));

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.