Coder Social home page Coder Social logo

alpsbte / plot-system-terra Goto Github PK

View Code? Open in Web Editor NEW
1.0 0.0 5.0 226 KB

Additional plugin for the Plot-System (https://github.com/AlpsBTE/Plot-System)

Home Page: https://jenkins.alps-bte.com/job/PlotSystem-Terra/

License: MIT License

Java 100.00%
bukkit spigot bte buildtheearth plotsystem

plot-system-terra's Introduction

AlpsBTE - Companion Plugin

This is a Spigot 1.12.2 plugin for our BTE server.

plot-system-terra's People

Contributors

coppertine avatar lordtuxn avatar minefact avatar

Stargazers

 avatar

plot-system-terra's Issues

[Bug] - Operation not allowed after ResultSet is closed

Description

When using a MySQL database SQL Statements won't work because the ResultSet gets closed before its analyzed.
This makes all executeQuery() calls fail.

Steps to Reproduce

  1. Use a MySQL database.
  2. Boot up the server.
  3. Receive an "Operation not allowed after ResultSet is closed" error.

Possible Solution

Close the ResultSet, PreparedStatement and Connection after the ResultSet got analyzed.
Create a function closeConnection() for that and insert it in all places where the executeQuery() function is used.

[Feature] - Auto Update functionality

Is your feature request related to a problem? Please describe
Currently all Build Teams have to update the Plot System Terra Plugin manually, when a new version comes out.
As soon as the Global Plot System is released, this could be a huge problem whenever we change something fundamental on the system that could cause some teams to not work properly anymore.
The more teams connect to the Global Plot System the harder it would be to get all teams to update their server as quick as possible.

Describe the solution you'd like
An auto update functionality is already implemented in the BuildTeamTools plugin (https://github.com/BuildTheEarth/BuildTeamTools) and works very well.
Whenever a new version is released on spigotmc (https://www.spigotmc.org/resources/buildteamtools.101854/) the server automatically downloads that update and replaces it once the server gets restarted.

[Feature] - Plot information sign on the terra server after reviewing plot

Hi, I am Straussi, as Staff at BTE Germany I am responsible to create new and review built plots.
Is your feature request related to a problem? Please describe
When submitted and reviewed plots get pasted into the Terra world, noone knows anymore, who built this plot, and which ID it had. But sometimes this would be useful, f.e. when there is a problem with the building etc.
Describe the solution you'd like
Therefore it would be a great feature if there was a sign with the ID and the name of the plot builder inside the building, so you know lateron, who built a certain plot.
You could do this by forcing a player to build a sign inside the house, before he can submit the building, the same way you have to place a sign on the street side, when creating a plot.

[Bug] - Plot mc_coordinates are stored from the player position not the plot center

Description

Currently the only way how to get the real terra coordinates of a plot is by using the "mc_coordinates" column in the database.
Another way is to analyze the schematic itself but thats not elegant.

The mc_coordinates data is used in the Plot System plugin to create the Google Maps links.
Its also used to recreate the schematic outline after completion, altough that isn't really necessary since the original schematic already contains the needed region outline.
In the Plot System Terra plugin its used to paste back the plot.

Problem

The problem is that those mc_coordinates are from the player position after he scanned the project.
This could be far away from the plot itself which would make the Goole Maps links inaccurate.
The player position itself is also not worth to save since it doesn't provide any important information.

Solution

Instead it would be much simpler to just save the plot center position and change the origin of the scanned region to the plot center too. This should not break any of the current usages since the origin is just somewhere else.

Code

DatabaseConnection.createStatement("INSERT INTO plotsystem_plots (id, city_project_id, difficulty_id, mc_coordinates, create_date, create_player) VALUES (?, ?, ?, ?, ?, ?)")
.setValue(plotID)
.setValue(cityProject.getID())
.setValue(difficultyID)
.setValue(player.getLocation().getBlockX() + "," + player.getLocation().getBlockY() + "," + player.getLocation().getBlockZ())
.setValue(java.sql.Date.valueOf(LocalDate.now()))
.setValue(player.getUniqueId().toString()).executeUpdate();

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.