-
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 #19 from Grubnest/feature-adding-velocity
Added Velocity
- Loading branch information
Showing
3 changed files
with
59 additions
and
4 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
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
39 changes: 39 additions & 0 deletions
39
src/main/java/com/grubnest/game/core/Velocity/VelocityPlugin.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,39 @@ | ||
package com.grubnest.game.core.Velocity; | ||
|
||
import com.google.inject.Inject; | ||
import com.velocitypowered.api.plugin.Plugin; | ||
import com.velocitypowered.api.proxy.ProxyServer; | ||
import net.kyori.adventure.text.Component; | ||
import org.slf4j.Logger; | ||
|
||
/** | ||
* The VelocityPlugin class is an implementation of the Velocity API. | ||
* It provides communication to and from the Velocity Proxy server | ||
* running on the Grubnest network | ||
* <p> | ||
* Date: 5/20/2022 | ||
* Authors: Theeef | ||
*/ | ||
@Plugin(id = "grubnestcore", name = "Grubnest Core Plugin", version = "0.1.0-SNAPSHOT", | ||
url = "htts://grubnest.com", description = "Grubnest Core running on Velocity", authors = {"Theeef"}) | ||
public class VelocityPlugin { | ||
|
||
private final ProxyServer server; | ||
private final Logger logger; | ||
|
||
|
||
/** | ||
* Creates an instance of the Velocity Plugin and injects it | ||
* | ||
* @param server The velocity proxy server | ||
* @param logger The proxy server's logger | ||
*/ | ||
@Inject | ||
public VelocityPlugin(ProxyServer server, Logger logger) { | ||
this.server = server; | ||
this.logger = logger; | ||
|
||
this.server.sendMessage(Component.text("GrubnestCore is enabled on Velocity!")); | ||
} | ||
|
||
} |