Loading Wallpapers on Servers
In order for our (myself and Dev's Coffee) import mod to become a pull request, there are a few things we need to discuss. Firstly, the wallpapers field in the laptop class will need to become an instance variable, otherwise adding a wallpaper to one laptop will add it to all laptops. Secondly, in order for this to work on a server, we need to change how wallpapers are loaded. Currently, wallpapers are loaded with resource locations. This is a problem because imported wallpapers are stored locally. If one play opens another player's laptop, the wallpapers will not render due to the fact that only the first player has the wallpaper locally saved. The resource location will point to a nonexistent wallpaper on the second player's client. Perhaps wallpapers would be saved as NBT data? If this is not changed, we will have to fire an event every time a wallpaper is loaded, and event listeners will install that wallpaper locally on every client in a directory set aside for that specific server (which will cause severe lagging).
There is Urls, a great invention
Take in mind that if files are going to be sent to other players, that may also create possibilities for exploits.
You dont need to send any files :P you can directly use ImageIO and URLStreams to make a direct exchange from a stream to a image and thus no way to exploit that (altho its still exchanging data between computers)
@Aregev2 I considered that approach, but there is no guarantee that the image will not be removed from whatever website.
@MisterMelDev that I have considered, which is why @lukas2005's approach seems more reasonable. Although in the end, sending large amounts of image data through a socket would cause stupid amounts lag, especially on servers with many players.
lol i have a random idea how 2 solve this (altho its not really that great XD) let's use IPFS for transferring wallpapers XD https://ipfs.io/