Discord Binding
This commit is contained in:
		
							
								
								
									
										2
									
								
								TODO.md
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								TODO.md
									
									
									
									
									
								
							| @ -4,9 +4,9 @@ | ||||
| - [-] Make Discord Webhoook for item changes | ||||
| - [x] deathBan reset | ||||
| - [x] voids exchanges | ||||
| - [x] /void give négatives values | ||||
| - [ ] chest name | ||||
| - [ ] /void manage bring  | ||||
| - [ ] Dupe bug (respawn) -> Gamerule | ||||
| - [x] /void give négatives values | ||||
| - [ ] /void give afficher title | ||||
|     - subtitle + chat | ||||
|  | ||||
| @ -15,7 +15,6 @@ import org.bukkit.entity.Player; | ||||
|  | ||||
| import net.kyori.adventure.text.Component; | ||||
| import ovh.herisson.thevoidroad.DatabaseManager; | ||||
| import ovh.herisson.thevoidroad.DiscordWebhook; | ||||
| import ovh.herisson.thevoidroad.TheVoidRoad; | ||||
| import ovh.herisson.thevoidroad.Voids; | ||||
| import ovh.herisson.thevoidroad.Entity.Merchand; | ||||
| @ -69,19 +68,6 @@ public class VoidCommands implements CommandExecutor, TabCompleter{ | ||||
| 						return true; | ||||
| 					case "skip": | ||||
| 						//TODO(Merchand): Skip trade | ||||
| 						break; | ||||
| 					case "discord": | ||||
| 							String link = DatabaseManager.getInstance().getConfig("discord-wh"); | ||||
| 							if(!link.equals("")){ | ||||
| 								DiscordWebhook discord = new DiscordWebhook(link); | ||||
| 								discord.setContent("Item mis en vente pendant une heure: " + Merchand.current.x + " au prix de " + Merchand.current.y + TheVoidRoad.CoinGlyph); | ||||
| 								try { | ||||
| 									discord.execute(); | ||||
| 								} catch(Exception e){ | ||||
| 									e.printStackTrace(); | ||||
| 								} | ||||
| 							} | ||||
|  | ||||
| 						break; | ||||
| 					case "goto": | ||||
| 						if(sender instanceof Player ply && m.getLocation() != null){ | ||||
|  | ||||
| @ -123,7 +123,13 @@ public class Merchand implements Listener{ | ||||
| 		String link = DatabaseManager.getInstance().getConfig("discord-wh"); | ||||
| 		if(!link.equals("")){ | ||||
| 			DiscordWebhook discord = new DiscordWebhook(link); | ||||
| 			discord.setContent("Item mis en vente pendant une heure: " + current.x + " au prix de " + current.y + TheVoidRoad.CoinGlyph); | ||||
| 			discord.setUsername(m.getName()); | ||||
| 			discord.setContent("Salut, Je vend actuellement `" + current.x + "` au prix de " + current.y + TheVoidRoad.CoinGlyph); | ||||
| 			try { | ||||
| 				discord.execute(); | ||||
| 			} catch(Exception ex){ | ||||
| 				ex.printStackTrace(); | ||||
| 			} | ||||
| 		} | ||||
| 		next = genTrade(e.unixhour + 1); | ||||
| 		regenerate(); | ||||
|  | ||||
		Reference in New Issue
	
	Block a user