Coder Social home page Coder Social logo

servergui's Introduction


Logo

ServerGUI [Velocity]

A GUI for server selection!
Download »

Report Bug · Request Feature

Features

Allow your players to use a GUI to select their server! Customizable and intuitive design, and easy to use!

(back to top)

Setup

Firstly, head over to the release page and download the latest version of the plugin. Drag the downloaded jar file into your plugins folder in your Velocity server.

We also require you to install Protocolize - it's how we are able to provide GUI support!

(back to top)

Getting Started

Simply alter anything in the config.yml and messages.yml that is generated located in ./plugins/servergui/....

Make sure users have permission node servergui.commands.server to run the /server command.

To reload the config, give yourself the permission servergui.commands.reload.

(back to top)

Server placeholders

For your config buttons we have some placeholder values available.

%server-name% - Server name as seen in velocity.toml

Players connected to that backend server

%server-connected% %server-online% %server-players%

(back to top)

License

Distributed under the MIT License.

(back to top)

Contact

MattMX - MattMX#0033

Project Link: https://github.com/Matt-MX/ServerGUI

(back to top)

Acknowledgments

(back to top)

servergui's People

Contributors

matt-mx avatar xrh0905 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

xrh0905

servergui's Issues

[Request] List of placeholders avaliable to the plugin.

I see you have a few placeholders being used in the config.yml but very little explanation of what they do (you kinda have to figure them out not that it's to hard to do that) but it would be nice to have a referance list some where of all the placeholder text that's avaliable to be used.

e.g right now im looking for some thing to show the Max Player count a server can have (%server-online% I know shows the current players) do we have one for max player count per server?

/server and /servergui bring up no GUI

Velocity up to date
Paper-Spigot (1.20.4)
Latest release of ServerGUI

When I execute the gui command, no message appears and no gui is opened.

Performing /servergui reload actually returns a reload confirmed message

Custom Shortcut commands for servers also appear to be working

Feature Request: Compatibility with running other velocity commands

It would be amazing to have support for other commands to be ran from other plugins on Velocity. For example, we use a AJQueues for our server and don't want players to direct connect which the GUI allows. It would be awesome if we could connect it to our queue plugin.

Not Working on Protocolize Update

After updating protocolize to support 1.19.1, /lobby and /server does not work anymore.

After doing /server command and picking a server, it sends errors in the console

[21:04:14 ERROR] [Protocolize]: === EXCEPTION CAUGHT IN DECODER ===
[21:04:14 ERROR] [Protocolize]: Protocolize 2.2.2:374
[21:04:14 ERROR] [Protocolize]: Stream Direction: UPSTREAM
[21:04:14 ERROR] [Protocolize]: InboundConnection: [connected player] belphygore (/49.145.38.251:43889), ServerConnection: null
[21:04:14 ERROR] [Protocolize]: Protocol version: 1.18.2
[21:04:14 ERROR]: java.lang.NoSuchMethodError: 'dev.simplix.protocolize.api.item.ItemStack dev.simplix.protocolize.api.inventory.InventoryClick.clickedItem()'
[21:04:14 ERROR]: at com.mattmx.servergui.gui.ServerSelector.onClick(ServerSelector.java:41)
[21:04:14 ERROR]: at com.mattmx.servergui.util.InventoryBuilder.onClickCancel(InventoryBuilder.java:111)
[21:04:14 ERROR]: at dev.simplix.protocolize.data.listeners.ClickWindowListener.lambda$packetReceive$0(ClickWindowListener.java:48)
[21:04:14 ERROR]: at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
[21:04:14 ERROR]: at dev.simplix.protocolize.data.listeners.ClickWindowListener.packetReceive(ClickWindowListener.java:48)
[21:04:14 ERROR]: at dev.simplix.protocolize.velocity.providers.VelocityPacketListenerProvider.lambda$handleInboundPacket$2(VelocityPacketListenerProvider.java:160)
[21:04:14 ERROR]: at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183)
[21:04:14 ERROR]: at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:179)
[21:04:14 ERROR]: at java.base/java.util.stream.SortedOps$SizedRefSortingSink.end(SortedOps.java:357)
[21:04:14 ERROR]: at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:510)
[21:04:14 ERROR]: at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
[21:04:14 ERROR]: at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150)
[21:04:14 ERROR]: at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173)
[21:04:14 ERROR]: at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
[21:04:14 ERROR]: at java.base/java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:596)
[21:04:14 ERROR]: at dev.simplix.protocolize.velocity.providers.VelocityPacketListenerProvider.handleInboundPacket(VelocityPacketListenerProvider.java:158)
[21:04:14 ERROR]: at dev.simplix.protocolize.velocity.netty.ProtocolizeDecoderChannelHandler.decode(ProtocolizeDecoderChannelHandler.java:83)
[21:04:14 ERROR]: at dev.simplix.protocolize.velocity.netty.ProtocolizeDecoderChannelHandler.decode(ProtocolizeDecoderChannelHandler.java:32)
[21:04:14 ERROR]: at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:88)
[21:04:14 ERROR]: at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
[21:04:14 ERROR]: at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)
[21:04:14 ERROR]: at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357)
[21:04:14 ERROR]: at com.velocitypowered.proxy.protocol.netty.MinecraftDecoder.tryDecode(MinecraftDecoder.java:89)
[21:04:14 ERROR]: at com.velocitypowered.proxy.protocol.netty.MinecraftDecoder.channelRead(MinecraftDecoder.java:58)
[21:04:14 ERROR]: at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
[21:04:14 ERROR]: at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)
[21:04:14 ERROR]: at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357)
[21:04:14 ERROR]: at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:103)
[21:04:14 ERROR]: at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
[21:04:14 ERROR]: at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)
[21:04:14 ERROR]: at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357)
[21:04:14 ERROR]: at io.netty.handler.timeout.IdleStateHandler.channelRead(IdleStateHandler.java:286)
[21:04:14 ERROR]: at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
[21:04:14 ERROR]: at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)
[21:04:14 ERROR]: at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357)
[21:04:14 ERROR]: at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:327)
[21:04:14 ERROR]: at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:299)
[21:04:14 ERROR]: at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
[21:04:14 ERROR]: at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)
[21:04:14 ERROR]: at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357)
[21:04:14 ERROR]: at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1410)
[21:04:14 ERROR]: at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
[21:04:14 ERROR]: at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)
[21:04:14 ERROR]: at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:919)
[21:04:14 ERROR]: at io.netty.channel.epoll.AbstractEpollStreamChannel$EpollStreamUnsafe.epollInReady(AbstractEpollStreamChannel.java:800)
[21:04:14 ERROR]: at io.netty.channel.epoll.EpollEventLoop.processReady(EpollEventLoop.java:487)
[21:04:14 ERROR]: at io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:385)
[21:04:14 ERROR]: at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:995)
[21:04:14 ERROR]: at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
[21:04:14 ERROR]: at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
[21:04:14 ERROR]: at java.base/java.lang.Thread.run(Thread.java:833)

Alternative to real-time building

Only build 1 GUI instance that is used for each player.

This way we won't have to build it in real-time every time we want to display it.

Server Switching

Multiple connections at once cause issues:
Make server switching asynchronous

Same as Issue #14

It is a similar issue except I am on Purpur (A Pufferfish fork, which is a Paper fork, which is a Spigot fork, in case anyone didn't know) for 1.18.2

[BUG] Not Working

I'm currently using the latest ServerGUI and Protocolize. I've had an old config file that always had worked before so I regenerated a new file and tested the new config file replacing only the server they point to but it still has the same problem. It doesn't really have any errors in both the proxy and backend servers but for the client it says Connection Lost: Timed Out . When I type /server, it opens up the GUI but when I click on any server, I just get laggy, then get kicked out. Another player who tested also had the same problem.

Additional Info: I tested the new ServerGUI version with the stable protocolize version now I'm using the latest dev build. I also updated velocity but to no avail.

Here is my old config file:
config.txt

Here is my new config file:
New Config.txt

I hope I provided enough info and I'd be happy to do some more digging to help.

[Bug] GUI items Can be Moved and Removed (#2 returns)

ServerGUI: 2.0
Protocolize: 2.2.2:374
Velocity: 3.5.1

Using the versions labled above I've noticed bug report #2 has reared its head once again.

Items when clicked in the GUI can be picked up moved around and placed in to the players own inventory.

I beleive this is because the origional inventory "onClick" event is not being canceled.

Redesign

ServerGUI will be redesigned in a new scalable way.

somegui:
	title: "Main GUI"
	rows: 6
	items:
		0:
			material: COMPASS
			# Leads to another gui named 'lobbies'
			opens: lobbies
	[...]
lobbies:
	title: "Lobbies"
	rows: 6
	items:
		0:
			material: COMPASS
			server: lobby1

Allowing for sub-categories of servers to connect to, which should help to make the plugin more viable for other servers.
The new plugin will come with a neat API to help with more any developers' more specific needs.

Will be working on this soon!

Question

Is it possible to open the /servergui for other people? Doesn't seem to work with CitizensCMD and just says unknown command

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.