Code Monkey home page Code Monkey logo

gunpowderteleport's Introduction

Gunpowder Teleport

Module for everything related to teleports such as homes and warps

Commands
  • /sethome [name]
    • Sets a home at your current location
  • /home [name]
    • Teleports you to the specified home
  • /setwarp [name]
    • [Admin Only] Sets a warp at the current location
  • /warp [name]
    • Teleports you to the specified warp
  • /tpa [player]
    • Sends a teleport request to the specified player
  • /tpahere [player]
    • Sends a request to teleport a player to you

gunpowderteleport's People

Contributors

martmists-gh avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

gunpowderteleport's Issues

Add a Cost to teleport

I would like a way to add a cost of using teleport, maybe even a variable cost, the longer the distance the higher cost.
It would also be nice to be able to configure different cost for different type of teleport, for example free to teleport to your first home or to spawn.

Cost could be configurable, for example XP, Food, or server currency.

Home keeps disappearing

When using /sethome without a name, the home keeps disappearing after server reboot. Error:
[13:37:08] [Gunpowder Database Thread/ERROR]: Error on Database Thread! Please report to the mod author if this is unexpected!
org.jetbrains.exposed.exceptions.ExposedSQLException: org.sqlite.SQLiteException: [SQLITE_CONSTRAINT] Abort due to constraint violation (UNIQUE constraint failed: Home.owner, Home.homeName)
at org.jetbrains.exposed.sql.statements.Statement.executeIn$exposed_core(Statement.kt:63) ~[030674d3-fa9a-4a01-88d8-d6f65f57e51d.jar:?]
at org.jetbrains.exposed.sql.Transaction.exec(Transaction.kt:129) ~[030674d3-fa9a-4a01-88d8-d6f65f57e51d.jar:?]
at org.jetbrains.exposed.sql.Transaction.exec(Transaction.kt:115) ~[030674d3-fa9a-4a01-88d8-d6f65f57e51d.jar:?]
at org.jetbrains.exposed.sql.statements.Statement.execute(Statement.kt:29) ~[030674d3-fa9a-4a01-88d8-d6f65f57e51d.jar:?]
at org.jetbrains.exposed.sql.QueriesKt.insert(Queries.kt:70) ~[030674d3-fa9a-4a01-88d8-d6f65f57e51d.jar:?]
at io.github.gunpowder.modelhandlers.HomeHandler$newHome$2.invoke(HomeHandler.java:99) ~[gunpowder-teleport-1.0.4+gunpowder.0.4.1.mc.1.16.5.jar:?]
at io.github.gunpowder.modelhandlers.HomeHandler$newHome$2.invoke(HomeHandler.java:40) ~[gunpowder-teleport-1.0.4+gunpowder.0.4.1.mc.1.16.5.jar:?]
at io.github.gunpowder.entities.GunpowderDatabase$databaseThread$1$value$1.invoke(GunpowderDatabase.java:53) ~[gunpowder-base-0.4.2+1.16.5.jar:?]
at io.github.gunpowder.entities.GunpowderDatabase$databaseThread$1$value$1.invoke(GunpowderDatabase.java:52) ~[gunpowder-base-0.4.2+1.16.5.jar:?]
at org.jetbrains.exposed.sql.transactions.ThreadLocalTransactionManagerKt$inTopLevelTransaction$1.invoke(ThreadLocalTransactionManager.kt:170) ~[030674d3-fa9a-4a01-88d8-d6f65f57e51d.jar:?]
at org.jetbrains.exposed.sql.transactions.ThreadLocalTransactionManagerKt$inTopLevelTransaction$2.invoke(ThreadLocalTransactionManager.kt:191) ~[030674d3-fa9a-4a01-88d8-d6f65f57e51d.jar:?]
at org.jetbrains.exposed.sql.transactions.ThreadLocalTransactionManagerKt.keepAndRestoreTransactionRefAfterRun(ThreadLocalTransactionManager.kt:199) ~[030674d3-fa9a-4a01-88d8-d6f65f57e51d.jar:?]
at org.jetbrains.exposed.sql.transactions.ThreadLocalTransactionManagerKt.inTopLevelTransaction(ThreadLocalTransactionManager.kt:190) ~[030674d3-fa9a-4a01-88d8-d6f65f57e51d.jar:?]
at org.jetbrains.exposed.sql.transactions.ThreadLocalTransactionManagerKt$transaction$1.invoke(ThreadLocalTransactionManager.kt:148) ~[030674d3-fa9a-4a01-88d8-d6f65f57e51d.jar:?]
at org.jetbrains.exposed.sql.transactions.ThreadLocalTransactionManagerKt.keepAndRestoreTransactionRefAfterRun(ThreadLocalTransactionManager.kt:199) ~[030674d3-fa9a-4a01-88d8-d6f65f57e51d.jar:?]
at org.jetbrains.exposed.sql.transactions.ThreadLocalTransactionManagerKt.transaction(ThreadLocalTransactionManager.kt:120) ~[030674d3-fa9a-4a01-88d8-d6f65f57e51d.jar:?]
at org.jetbrains.exposed.sql.transactions.ThreadLocalTransactionManagerKt.transaction(ThreadLocalTransactionManager.kt:118) ~[030674d3-fa9a-4a01-88d8-d6f65f57e51d.jar:?]
at org.jetbrains.exposed.sql.transactions.ThreadLocalTransactionManagerKt.transaction$default(ThreadLocalTransactionManager.kt:117) ~[030674d3-fa9a-4a01-88d8-d6f65f57e51d.jar:?]
at io.github.gunpowder.entities.GunpowderDatabase$databaseThread$1.invoke(GunpowderDatabase.java:52) [gunpowder-base-0.4.2+1.16.5.jar:?]
at io.github.gunpowder.entities.GunpowderDatabase$databaseThread$1.invoke(GunpowderDatabase.java:44) [gunpowder-base-0.4.2+1.16.5.jar:?]
at kotlin.concurrent.ThreadsKt$thread$thread$1.run(Thread.kt:30) [420d3c92-4482-474d-ba2a-9936668868da.jar:?]
Caused by: org.sqlite.SQLiteException: [SQLITE_CONSTRAINT] Abort due to constraint violation (UNIQUE constraint failed: Home.owner, Home.homeName)
at org.sqlite.core.DB.newSQLException(DB.java:941) ~[8832d794-ef77-43ba-b34b-b347d3da8bdb.jar:?]
at org.sqlite.core.DB.newSQLException(DB.java:953) ~[8832d794-ef77-43ba-b34b-b347d3da8bdb.jar:?]
at org.sqlite.core.DB.execute(DB.java:854) ~[8832d794-ef77-43ba-b34b-b347d3da8bdb.jar:?]
at org.sqlite.core.DB.executeUpdate(DB.java:895) ~[8832d794-ef77-43ba-b34b-b347d3da8bdb.jar:?]
at org.sqlite.jdbc3.JDBC3PreparedStatement.executeUpdate(JDBC3PreparedStatement.java:102) ~[8832d794-ef77-43ba-b34b-b347d3da8bdb.jar:?]
at org.jetbrains.exposed.sql.statements.jdbc.JdbcPreparedStatementImpl.executeUpdate(JdbcPreparedStatementImpl.kt:23) ~[f4869db9-d9f6-458e-bae0-815c46595169.jar:?]
at org.jetbrains.exposed.sql.statements.InsertStatement.execInsertFunction(InsertStatement.kt:111) ~[030674d3-fa9a-4a01-88d8-d6f65f57e51d.jar:?]
at org.jetbrains.exposed.sql.statements.InsertStatement.executeInternal(InsertStatement.kt:117) ~[030674d3-fa9a-4a01-88d8-d6f65f57e51d.jar:?]
at org.jetbrains.exposed.sql.statements.InsertStatement.executeInternal(InsertStatement.kt:11) ~[030674d3-fa9a-4a01-88d8-d6f65f57e51d.jar:?]
at org.jetbrains.exposed.sql.statements.Statement.executeIn$exposed_core(Statement.kt:61) ~[030674d3-fa9a-4a01-88d8-d6f65f57e51d.jar:?]
... 20 more

Teleport arrival position & orientation issue

When teleporting, it often happens that you arrive looking straight up into the sky.

2020-08-25_15 06 43

Homes & Warps are also always set on the cross-point of 4 blocks. I don't know anything about coding but it looks like the decimals of the coordinates are not saved. Setting a warp/home on a slab or similar will then teleport you into the slab on arrival (decimals of y-coordinate not saved).

2020-08-25_15 07 32

[Suggestion] Allow admin to decide how many homes a player can set

Basically title. But basically, even 5 homes could be seen as too many on some servers. Maybe some admins only want players to have 1 home. On the other end of the spectrum, perhaps there are some scenarios where admins want players to have 10 homes.

It would be nice if the admin could somehow decide the number of homes a player can set. Perhaps it could even be set in-game with a command like /homelimit [playername] [number] to quickly change the number of homes a player is able to set.

1.17 Home Command Not Recognized

Hello, after deleting the database and configs as they apparently arent compatible anymore, the home and sethome commands are no longer recognized but the warp commands are. Any help I can get with this issue would be greatly appreciated.

Add /setspawn and /delspawn commands

Right now, /spawn teleports to the world's spawn. While that's fine, if you have multiple worlds (from something like Multiverse), it may be preferable if there was a 'global spawn', like in EssentialsX. These would be set using /setspawn and /delspawn.

Disable and limit the use of back

I would like to limit or even disable the usage og back.
For example only allowing it after death, to get back to where one died.
Or disable it entirely.

As it is now it is pretty OP, A user can use back and then back and then back.

I would also like to configure some type of cost of using the command, like XP, Food, or server Currency, this should actually be on every type of teleport. I will create a separate issue fot this.

[Suggestion] Make teleport cancel if you move.

Title^

If you move the teleportation countdown should get cancelled.
Right now you can run around freely while the countdown is counting down, really no point of the countdown if it doesn't cancel, yea?

- Gbergz

[BUG] MySQL Crashing

When using MySQL option in Gunpowder, and trying to load the Teleport option, it fails to load with this error.

at java.lang.reflect.Constructor.newInstance(Constructor.java:490) ~[?:?]
at com.mysql.jdbc.Util.handleNewInstance(Util.java:425) ~[b320830c-e827-4881-b345-b052ad2cd02f.jar:?]
at com.mysql.jdbc.Util.getInstance(Util.java:408) ~[b320830c-e827-4881-b345-b052ad2cd02f.jar:?]
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:944) ~[b320830c-e827-4881-b345-b052ad2cd02f.jar:?]
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3976) ~[b320830c-e827-4881-b345-b052ad2cd02f.jar:?]
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3912) ~[b320830c-e827-4881-b345-b052ad2cd02f.jar:?]
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2530) ~[b320830c-e827-4881-b345-b052ad2cd02f.jar:?]
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2683) ~[b320830c-e827-4881-b345-b052ad2cd02f.jar:?]
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2486) ~[b320830c-e827-4881-b345-b052ad2cd02f.jar:?]
at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1858) ~[b320830c-e827-4881-b345-b052ad2cd02f.jar:?]
at com.mysql.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:2079) ~[b320830c-e827-4881-b345-b052ad2cd02f.jar:?]
at com.mysql.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:2013) ~[b320830c-e827-4881-b345-b052ad2cd02f.jar:?]
at com.mysql.jdbc.PreparedStatement.executeLargeUpdate(PreparedStatement.java:5104) ~[b320830c-e827-4881-b345-b052ad2cd02f.jar:?]
at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1998) ~[b320830c-e827-4881-b345-b052ad2cd02f.jar:?]
at org.jetbrains.exposed.sql.statements.jdbc.JdbcPreparedStatementImpl.executeUpdate(JdbcPreparedStatementImpl.kt:23) ~[643a5c33-e509-4238-ba37-77163b3df3df.jar:?]
at org.jetbrains.exposed.sql.Transaction$exec$2.executeInternal(Transaction.kt:93) ~[083567af-ec12-4496-bcda-411b454db50d.jar:?]
at org.jetbrains.exposed.sql.statements.Statement.executeIn$exposed_core(Statement.kt:61) ~[083567af-ec12-4496-bcda-411b454db50d.jar:?]
at org.jetbrains.exposed.sql.Transaction.exec(Transaction.kt:126) ~[083567af-ec12-4496-bcda-411b454db50d.jar:?]
at org.jetbrains.exposed.sql.Transaction.exec(Transaction.kt:112) ~[083567af-ec12-4496-bcda-411b454db50d.jar:?]
at org.jetbrains.exposed.sql.Transaction.exec(Transaction.kt:88) ~[083567af-ec12-4496-bcda-411b454db50d.jar:?]
at org.jetbrains.exposed.sql.Transaction.exec(Transaction.kt:79) ~[083567af-ec12-4496-bcda-411b454db50d.jar:?]
at org.jetbrains.exposed.sql.SchemaUtils.execStatements(SchemaUtils.kt:175) ~[083567af-ec12-4496-bcda-411b454db50d.jar:?]
at org.jetbrains.exposed.sql.SchemaUtils.createMissingTablesAndColumns(SchemaUtils.kt:236) ~[083567af-ec12-4496-bcda-411b454db50d.jar:?]
at org.jetbrains.exposed.sql.SchemaUtils.createMissingTablesAndColumns$default(SchemaUtils.kt:229) ~[083567af-ec12-4496-bcda-411b454db50d.jar:?]
at io.github.gunpowder.entities.GunpowderRegistry$registerTable$1.invoke(GunpowderRegistry.java:88) ~[gunpowder-base-0.2.10+1.16.2.jar:?]
at io.github.gunpowder.entities.GunpowderRegistry$registerTable$1.invoke(GunpowderRegistry.java:52) ~[gunpowder-base-0.2.10+1.16.2.jar:?]
at org.jetbrains.exposed.sql.transactions.ThreadLocalTransactionManagerKt$inTopLevelTransaction$1.invoke(ThreadLocalTransactionManager.kt:156) ~[083567af-ec12-4496-bcda-411b454db50d.jar:?]
at org.jetbrains.exposed.sql.transactions.ThreadLocalTransactionManagerKt$inTopLevelTransaction$2.invoke(ThreadLocalTransactionManager.kt:197) ~[083567af-ec12-4496-bcda-411b454db50d.jar:?]
at org.jetbrains.exposed.sql.transactions.ThreadLocalTransactionManagerKt.keepAndRestoreTransactionRefAfterRun(ThreadLocalTransactionManager.kt:205) ~[083567af-ec12-4496-bcda-411b454db50d.jar:?]
at org.jetbrains.exposed.sql.transactions.ThreadLocalTransactionManagerKt.inTopLevelTransaction(ThreadLocalTransactionManager.kt:196) ~[083567af-ec12-4496-bcda-411b454db50d.jar:?]
at org.jetbrains.exposed.sql.transactions.ThreadLocalTransactionManagerKt$transaction$1.invoke(ThreadLocalTransactionManager.kt:134) ~[083567af-ec12-4496-bcda-411b454db50d.jar:?]
at org.jetbrains.exposed.sql.transactions.ThreadLocalTransactionManagerKt.keepAndRestoreTransactionRefAfterRun(ThreadLocalTransactionManager.kt:205) ~[083567af-ec12-4496-bcda-411b454db50d.jar:?]
at org.jetbrains.exposed.sql.transactions.ThreadLocalTransactionManagerKt.transaction(ThreadLocalTransactionManager.kt:106) ~[083567af-ec12-4496-bcda-411b454db50d.jar:?]
at org.jetbrains.exposed.sql.transactions.ThreadLocalTransactionManagerKt.transaction(ThreadLocalTransactionManager.kt:104) ~[083567af-ec12-4496-bcda-411b454db50d.jar:?]
at io.github.gunpowder.entities.GunpowderRegistry.registerTable(GunpowderRegistry.java:87) ~[gunpowder-base-0.2.10+1.16.2.jar:?]
at io.github.gunpowder.GunpowderTeleportModule.onInitialize(GunpowderTeleportModule.java:69) ~[gunpowder-teleport-1.0.0+gunpowder.0.2.9.mc.1.16.2.jar:?]
at io.github.gunpowder.mod.AbstractGunpowderMod.initialize(AbstractGunpowderMod.java:77) ~[gunpowder-base-0.2.10+1.16.2.jar:?]
at io.github.gunpowder.mod.server.GunpowderServerMod.onInitializeServer(GunpowderServerMod.java:43) ~[gunpowder-base-0.2.10+1.16.2.jar:?]
at net.fabricmc.loader.entrypoint.minecraft.hooks.EntrypointUtils.invoke0(EntrypointUtils.java:50) ~[fabric-server-launch.jar:?]
... 17 more

Non-admins can set warps

The readme says /setwarp is an admin-only command. However, any player with access to /warp can use /warp set and set a new warp. Is there a way to restrict this somehow?

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.