Sueta

NewsListGUI

1.2

It is a plugin that can display real news in GUI. There is also News API.

·Plugin

NewsListGUI can display the actual news as a GUI.

【ScreenShot】

【Command】

/nlg - About Command
/nlg reload - Reload Command
/news - Display the news GUI

【Permission】
nlg.reload.use - Reload Command

【Installation method】

Please put it in the plugin file, restart it, set ApiKey from the config file and restart it. If you do not set ApiKey, the plugin will not start. Get ApiKey from newsapi.org.


【Config】

#Created by JP_Mc_Dr1080.
#Created NewsAPI by SimplyRin.
#Please get ApiKey from newsapi.org.
ApiKey: NONE
#For Country, please enter the country you live in.
Country: US
#Gui settings
GuiTitle: "&e&lNewsListGUI"
Title: "&e&lTitle&e:&7 "
Author: "&e&lAuthor&e:&7 "
Posted_date: "&e&lPosted date&e:&7 "
ClickDescription: "&7Click to see more detailed information."
ItemID: 339
#Setting up chat messages
NewsMessege:
- "&6=================================[News]================================="
- "&e&lTitle&e:&7 %title%"
- "&e&lAuthor&e:&7 %author%"
- "&e&lPosted date&e:&7 %publishedat%"
- "&e&lDescription&e:&7 %description%"
- "&e&lURL&e:&7 %url%"
- "&e&lCountry&e:&7 %country%"
- "&6============================================================================"
None: "None"
Income: "&7Income..."
#Setting of reload message
ReloadMessege: "%prefix%&aReload config.yml."
#Setting permission messages
NoPermissionMessege: "%prefix%&cYou do not have permission."
 
#Sound setting
#MessegeSound can set the sound when news messages are displayed.
MessegeSound: ENTITY_ITEM_PICKUP
#OpenMenuSound lets you set the sound when you open the menu.
OpenMenuSound: ENTITY_EXPERIENCE_ORB_PICKUP


【API】
This API was created by SimplyRin.

https://github.com/SimplyRin/NewsAPI

Acquire only one

NewsApi newsApi = new NewsApi("API_KEY");
NewsData newsData = newsApi.getNewsData();

System.out.println("Author: " + newsData.getAuthor());
System.out.println("Title: " + newsData.getTitle());
System.out.println("Description: " + newsData.getDescription());
System.out.println("URL: " + newsData.getUrl());
System.out.println("PublishedAt: " + newsData.getPublishedAt());
System.out.println("Country: " + newsData.getNewsCountry());

All acquisition (List)

NewsApi newsApi = new NewsApi("API_KEY");
List<NewsData> allNewsData = newsApi.getAllNewsData();

for(NewsData newsData : allNewsData)  {
   System.out.println("Author: " + newsData.getAuthor());
   System.out.println("Title: " + newsData.getTitle());
   System.out.println("Description: " + newsData.getDescription());
   System.out.println("URL: " + newsData.getUrl());
   System.out.println("PublishedAt: " + newsData.getPublishedAt());
   System.out.println("Country: " + newsData.getNewsCountry());
}

[★★★★★]
Please five star!

Please stop spoofing like I made. Do not decompile absolutely, either. enjoy!

Similar projects

Plugin →