-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #29 from Grubnest/hotfix-sql-spigot-link
Hotfix sql spigot link
- Loading branch information
Showing
9 changed files
with
116 additions
and
82 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
src/main/java/com/grubnest/game/core/bridge/entities/GrubnestPlayer.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package com.grubnest.game.core.bridge.entities; | ||
|
||
public interface GrubnestPlayer { | ||
|
||
void updateUsername(); | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
src/main/java/com/grubnest/game/core/velocity/entities/VPlayer.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
package com.grubnest.game.core.velocity.entities; | ||
|
||
import com.grubnest.game.core.bridge.entities.GrubnestPlayer; | ||
import com.grubnest.game.core.velocity.VelocityPlugin; | ||
import com.velocitypowered.api.proxy.Player; | ||
|
||
/** | ||
* Represents a custom player entity on the Velocity server | ||
* | ||
* @author Theeef | ||
* @version 1.0 at 5/26/2022 | ||
*/ | ||
public class VPlayer implements GrubnestPlayer { | ||
|
||
private Player player; | ||
|
||
/** | ||
* Creates a custom player instance for Velocity | ||
* | ||
* @param player the player this represents | ||
*/ | ||
public VPlayer(Player player) { | ||
this.player = player; | ||
} | ||
|
||
/** | ||
* Updates the cached username of this player in the database | ||
*/ | ||
public void updateUsername() { | ||
VelocityPlugin.getInstance().getMySQL().updatePlayerUsername(this.player); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters