Compare commits
	
		
			4 Commits
		
	
	
		
			af96c5a412
			...
			f36e6b1aa0
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| f36e6b1aa0 | |||
| 629695ac21 | |||
| 8bf35896f4 | |||
| 1d34a3040d | 
							
								
								
									
										18
									
								
								TODO.md
									
									
									
									
									
								
							
							
						
						
									
										18
									
								
								TODO.md
									
									
									
									
									
								
							| @ -3,15 +3,17 @@ | |||||||
| - [x] deathBan reset | - [x] deathBan reset | ||||||
| - [x] voids exchanges | - [x] voids exchanges | ||||||
| - [x] /void give négatives values | - [x] /void give négatives values | ||||||
| - [+] Make Discord Webhoook for item changes | - [x] Make Discord Webhoook for item changes | ||||||
| - [+] chest name | - [x] chest name | ||||||
| - [+] Show next Item | - [x] Show next Item | ||||||
|  | - [x] /void manage bring  | ||||||
| - [+] /void give afficher title | - [+] /void give afficher title | ||||||
|     - subtitle + chat |     - subtitle + chat | ||||||
| - [ ] i18n | - [+] Double Check Inventory reset on die | ||||||
| - [ ] /void manage bring  | - [+] Annonce | ||||||
| - [ ] Dupe bug (respawn) -> Gamerule | - [+] Find Map : 51 (250, 300) | ||||||
|  | - [+] Dupe bug (respawn) | ||||||
|  | - [-] i18n | ||||||
| - [ ] Events | - [ ] Events | ||||||
| - [ ] Command completions | - [ ] Command completions | ||||||
| - [ ] Annonce | - [ ] More descriptive /void commands | ||||||
| - [ ] Double Check Inventory reset on die |  | ||||||
|  | |||||||
| @ -20,6 +20,9 @@ public class BanHourly implements Listener{ | |||||||
| 	@EventHandler | 	@EventHandler | ||||||
| 	public void died(PlayerDeathEvent e){ | 	public void died(PlayerDeathEvent e){ | ||||||
| 		DatabaseManager.getInstance().setDeath(e.getPlayer().getUniqueId()); | 		DatabaseManager.getInstance().setDeath(e.getPlayer().getUniqueId()); | ||||||
|  | 		e.setKeepInventory(true); | ||||||
|  | 		e.setKeepLevel(false); | ||||||
|  | 		e.getDrops().clear(); | ||||||
| 		e.getPlayer().kick(Component.text("Vous etes mort dans la dernière heure... Patientez la prochaine!"), Cause.BANNED); | 		e.getPlayer().kick(Component.text("Vous etes mort dans la dernière heure... Patientez la prochaine!"), Cause.BANNED); | ||||||
| 	} | 	} | ||||||
| } | } | ||||||
|  | |||||||
| @ -11,7 +11,6 @@ import java.util.HashMap; | |||||||
| import java.util.UUID; | import java.util.UUID; | ||||||
|  |  | ||||||
| import org.bukkit.Bukkit; | import org.bukkit.Bukkit; | ||||||
| import org.bukkit.entity.Player; |  | ||||||
| import org.jetbrains.annotations.Nullable; | import org.jetbrains.annotations.Nullable; | ||||||
|  |  | ||||||
| public class DatabaseManager { | public class DatabaseManager { | ||||||
|  | |||||||
| @ -1,4 +1,4 @@ | |||||||
| package ovh.herisson.thevoidroad.Event; | package ovh.herisson.thevoidroad; | ||||||
| 
 | 
 | ||||||
| import java.time.LocalTime; | import java.time.LocalTime; | ||||||
| 
 | 
 | ||||||
| @ -1,4 +1,4 @@ | |||||||
| package ovh.herisson.thevoidroad.Entity; | package ovh.herisson.thevoidroad; | ||||||
| 
 | 
 | ||||||
| import java.io.File; | import java.io.File; | ||||||
| import java.nio.file.Files; | import java.nio.file.Files; | ||||||
| @ -24,12 +24,6 @@ import org.bukkit.inventory.ItemStack; | |||||||
| import org.bukkit.persistence.PersistentDataType; | import org.bukkit.persistence.PersistentDataType; | ||||||
| 
 | 
 | ||||||
| import net.kyori.adventure.text.Component; | 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.Event.HourEvent; |  | ||||||
| import ovh.herisson.thevoidroad.util.Tuple; |  | ||||||
| 
 | 
 | ||||||
| //Unique, so singleton patern | //Unique, so singleton patern | ||||||
| public class Merchand implements Listener{ | public class Merchand implements Listener{ | ||||||
| @ -89,6 +83,7 @@ public class Merchand implements Listener{ | |||||||
| 		m.setGlowing(true); | 		m.setGlowing(true); | ||||||
| 		m.setInvulnerable(true); | 		m.setInvulnerable(true); | ||||||
| 		m.customName(Component.text(names.get(new Random().nextInt(names.size())))); | 		m.customName(Component.text(names.get(new Random().nextInt(names.size())))); | ||||||
|  | 		m.setCustomNameVisible(true); | ||||||
| 		inv = Bukkit.createInventory(null, 9, Component.text(m.getName())); | 		inv = Bukkit.createInventory(null, 9, Component.text(m.getName())); | ||||||
| 		Bukkit.getServer().forEachAudience((a) -> { | 		Bukkit.getServer().forEachAudience((a) -> { | ||||||
| 			if(a instanceof Player ply){ | 			if(a instanceof Player ply){ | ||||||
| @ -177,4 +172,8 @@ public class Merchand implements Listener{ | |||||||
| 			} | 			} | ||||||
| 		} | 		} | ||||||
| 	} | 	} | ||||||
|  | 
 | ||||||
|  |     public void teleport(Location location) { | ||||||
|  | 		m.teleport(location); | ||||||
|  |     } | ||||||
| } | } | ||||||
| @ -2,9 +2,9 @@ package ovh.herisson.thevoidroad; | |||||||
|  |  | ||||||
| import org.bukkit.plugin.java.JavaPlugin; | import org.bukkit.plugin.java.JavaPlugin; | ||||||
|  |  | ||||||
| import ovh.herisson.thevoidroad.Commands.VoidCommands; | import ovh.herisson.thevoidroad.VoidCommands; | ||||||
| import ovh.herisson.thevoidroad.Entity.Merchand; | import ovh.herisson.thevoidroad.Merchand; | ||||||
| import ovh.herisson.thevoidroad.Event.HourEvent; | import ovh.herisson.thevoidroad.HourEvent; | ||||||
|  |  | ||||||
| public class TheVoidRoad extends JavaPlugin{ | public class TheVoidRoad extends JavaPlugin{ | ||||||
|  |  | ||||||
|  | |||||||
| @ -1,4 +1,4 @@ | |||||||
| package ovh.herisson.thevoidroad.util; | package ovh.herisson.thevoidroad; | ||||||
| 
 | 
 | ||||||
| public class Tuple<X, Y> {  | public class Tuple<X, Y> {  | ||||||
|   public final X x;  |   public final X x;  | ||||||
| @ -1,4 +1,4 @@ | |||||||
| package ovh.herisson.thevoidroad.Commands; | package ovh.herisson.thevoidroad; | ||||||
| 
 | 
 | ||||||
| import java.util.ArrayList; | import java.util.ArrayList; | ||||||
| import java.util.List; | import java.util.List; | ||||||
| @ -17,7 +17,7 @@ import net.kyori.adventure.text.Component; | |||||||
| import ovh.herisson.thevoidroad.DatabaseManager; | import ovh.herisson.thevoidroad.DatabaseManager; | ||||||
| import ovh.herisson.thevoidroad.TheVoidRoad; | import ovh.herisson.thevoidroad.TheVoidRoad; | ||||||
| import ovh.herisson.thevoidroad.Voids; | import ovh.herisson.thevoidroad.Voids; | ||||||
| import ovh.herisson.thevoidroad.Entity.Merchand; | import ovh.herisson.thevoidroad.Merchand; | ||||||
| 
 | 
 | ||||||
| public class VoidCommands implements CommandExecutor, TabCompleter{ | public class VoidCommands implements CommandExecutor, TabCompleter{ | ||||||
| 	private final Merchand m = Merchand.getInstance(); | 	private final Merchand m = Merchand.getInstance(); | ||||||
| @ -76,6 +76,14 @@ public class VoidCommands implements CommandExecutor, TabCompleter{ | |||||||
| 							sender.sendMessage("You can't teleport!"); | 							sender.sendMessage("You can't teleport!"); | ||||||
| 						} | 						} | ||||||
| 						break; | 						break; | ||||||
|  | 					case "bring": | ||||||
|  | 						if(sender instanceof Player ply && m.getLocation() != null){ | ||||||
|  | 							m.teleport(ply.getLocation()); | ||||||
|  | 						}else{ | ||||||
|  | 							return false; | ||||||
|  | 						} | ||||||
|  | 						break; | ||||||
|  | 
 | ||||||
| 					case "balance": | 					case "balance": | ||||||
| 						if(args.length < 5) return false; | 						if(args.length < 5) return false; | ||||||
| 						switch (args[2]) { | 						switch (args[2]) { | ||||||
		Reference in New Issue
	
	Block a user