On master: Team disguises options
This commit is contained in:
		
							
								
								
									
										19
									
								
								config.yml
									
									
									
									
									
								
							
							
						
						
									
										19
									
								
								config.yml
									
									
									
									
									
								
							| @@ -1,47 +1,64 @@ | |||||||
| # Shall I notify people of a LibsDisguises update? | # Shall I notify people of a LibsDisguises update? | ||||||
| NotifyUpdate: true | NotifyUpdate: true | ||||||
|  |  | ||||||
|  | # Should the plugin use scoreboards to disable pushing? Please note that disabling this effectively means that self disguises will push the disguiser around | ||||||
|  | # Alternatively when this is enabled this will remove the player from any scoreboard team he is in | ||||||
|  | DisablePushing: true | ||||||
|  |  | ||||||
| # Whats the permission to get the notification? | # Whats the permission to get the notification? | ||||||
| Permission: 'libsdisguises.update' | Permission: 'libsdisguises.update' | ||||||
|  |  | ||||||
| # Whats the max size allowed for command disguiseradius | # Whats the max size allowed for command disguiseradius | ||||||
| DisguiseRadiusMax: 50 | DisguiseRadiusMax: 50 | ||||||
|  |  | ||||||
| # Whats the max size allowed for command undisguiseradius | # Whats the max size allowed for command undisguiseradius | ||||||
| UndisguiseRadiusMax: 50 | UndisguiseRadiusMax: 50 | ||||||
|  |  | ||||||
| # Shall the players view their disguises? | # Shall the players view their disguises? | ||||||
| # Best used when viewing yourself in 3rd person | # Best used when viewing yourself in 3rd person | ||||||
| ViewSelfDisguises: true | ViewSelfDisguises: true | ||||||
|  |  | ||||||
| # Shall I disguise the sounds? | # Shall I disguise the sounds? | ||||||
| # This turns your damage sound into a MOOOO | # This turns your damage sound into a MOOOO | ||||||
| DisguiseSounds: true | DisguiseSounds: true | ||||||
|  |  | ||||||
| # Shall the disguised hear their disguise sounds or their damage sounds. | # Shall the disguised hear their disguise sounds or their damage sounds. | ||||||
| # I disable this as it can be a little confusing when not used with self disguises | # I disable this as it can be a little confusing when not used with self disguises | ||||||
| HearSelfDisguise: true | HearSelfDisguise: true | ||||||
|  |  | ||||||
| # Shall I send the velocity packets? I REALLY recommend you don't disable. | # Shall I send the velocity packets? I REALLY recommend you don't disable. | ||||||
| # This is the only thing allowing the mobs to fly without glitching out. | # This is the only thing allowing the mobs to fly without glitching out. | ||||||
| SendVelocity: true | SendVelocity: true | ||||||
|  |  | ||||||
| # For self disguises, they need to have the armor and the held item removed | # For self disguises, they need to have the armor and the held item removed | ||||||
| # Else they see floating armor, floating held items. | # Else they see floating armor, floating held items. | ||||||
| # This turns the items invisible in the disguised players inventory. It does not actually remove them! | # This turns the items invisible in the disguised players inventory. It does not actually remove them! | ||||||
| RemoveArmor: true | RemoveArmor: true | ||||||
| RemoveHeldItem: false | RemoveHeldItem: false | ||||||
|  |  | ||||||
| # If you set a disguise to burning, it will no longer be able to be shown as sneaking or invisible. | # If you set a disguise to burning, it will no longer be able to be shown as sneaking or invisible. | ||||||
| # Set this to true if you want the disguise to get the animations of the disguised entity. Such as invisible, on fire, sprinting, sneaking, blocking | # Set this to true if you want the disguise to get the animations of the disguised entity. Such as invisible, on fire, sprinting, sneaking, blocking | ||||||
| # This is only valid if you set a animation on the disguise itself. Because the entitys animations are applied otherwise. | # This is only valid if you set a animation on the disguise itself. Because the entitys animations are applied otherwise. | ||||||
| AddEntityAnimations: true | AddEntityAnimations: true | ||||||
|  |  | ||||||
| # When a sheep or wolf is right clicked with dye. The client automatically assumes it was successful and displays the sheeps wool or the wolfs collar as dyed. | # When a sheep or wolf is right clicked with dye. The client automatically assumes it was successful and displays the sheeps wool or the wolfs collar as dyed. | ||||||
| # This is a option that either prevents that happening, or it changes their color officially in the plugin so that everyone sees it changed. | # This is a option that either prevents that happening, or it changes their color officially in the plugin so that everyone sees it changed. | ||||||
| # Its currently set to false which means that the color is not changed and will refresh itself to the player. | # Its currently set to false which means that the color is not changed and will refresh itself to the player. | ||||||
| # Please note that this will not remove the dye from their hands. This also does not check if the disguised entity is actually a sheep/wolf and wants a say in its color. | # Please note that this will not remove the dye from their hands. This also does not check if the disguised entity is actually a sheep/wolf and wants a say in its color. | ||||||
| DyeableSheep: false | DyeableSheep: false | ||||||
| DyeableWolf: false | DyeableWolf: false | ||||||
|  |  | ||||||
| # This is only called into action when the disguise is constructed using the commands. | # This is only called into action when the disguise is constructed using the commands. | ||||||
| # And when the disguise supports that. This will not be used at all for plugins constructing the disguises for instance. | # And when the disguise supports that. This will not be used at all for plugins constructing the disguises for instance. | ||||||
| # Such as prophunt. Its also false because its kind of a retarded feature. | # Such as prophunt. Its also false because its kind of a retarded feature. | ||||||
| # This is pretty simple. It shows the players displayname (Name as it appears in chat) above their head. | # This is pretty simple. It shows the players displayname (Name as it appears in chat) above their head. | ||||||
| # This also overrides any custom name they have set in their disguise options. | # This also overrides any custom name they have set in their disguise options. | ||||||
| ShowNamesAboveDisguises: false | ShowNamesAboveDisguises: false | ||||||
|  |  | ||||||
| # This supports the above option. | # This supports the above option. | ||||||
| # If this is true, then the name shown above the head appears regardless of if you are looking at the disguise directly or not. | # If this is true, then the name shown above the head appears regardless of if you are looking at the disguise directly or not. | ||||||
| NameAboveHeadAlwaysVisible: true | NameAboveHeadAlwaysVisible: true | ||||||
|  |  | ||||||
| # This modifys the bounding box, This is stuff like can a arrow hit them. | # This modifys the bounding box, This is stuff like can a arrow hit them. | ||||||
| # If you turn this to true, arrows will act like they hit the disguise in the right place! | # If you turn this to true, arrows will act like they hit the disguise in the right place! | ||||||
| # So someone disguised as a enderdragon will easily get shot down by arrows! | # So someone disguised as a enderdragon will easily get shot down by arrows! | ||||||
| @@ -49,10 +66,12 @@ NameAboveHeadAlwaysVisible: true | |||||||
| # This shouldn't really be enabled for players as it also interferes with their movement because the server thinks the player is larger than he really is. | # This shouldn't really be enabled for players as it also interferes with their movement because the server thinks the player is larger than he really is. | ||||||
| # That makes the player unable to approach this building because the server thinks he is trying to glitch inside blocks. | # That makes the player unable to approach this building because the server thinks he is trying to glitch inside blocks. | ||||||
| ModifyBoundingBox: false | ModifyBoundingBox: false | ||||||
|  |  | ||||||
| # This prevents disguised players from being targeted by monsters. | # This prevents disguised players from being targeted by monsters. | ||||||
| # This doesn't prevent their targeting you if already targeting when disguised | # This doesn't prevent their targeting you if already targeting when disguised | ||||||
| # They will just ignore you unless provoked. | # They will just ignore you unless provoked. | ||||||
| MonstersIgnoreDisguises: false | MonstersIgnoreDisguises: false | ||||||
|  |  | ||||||
| # Sigh. People are going to want this. | # Sigh. People are going to want this. | ||||||
| # So lets make your disguise blown if you are attacked.. | # So lets make your disguise blown if you are attacked.. | ||||||
| # Works only for disguised players when attacked by a entity (arrow, monster. etc) | # Works only for disguised players when attacked by a entity (arrow, monster. etc) | ||||||
|   | |||||||
| @@ -56,6 +56,7 @@ public class DisguiseConfig { | |||||||
|     private static String updateNotificationPermission; |     private static String updateNotificationPermission; | ||||||
|     private static boolean viewSelfDisguise; |     private static boolean viewSelfDisguise; | ||||||
|     private static boolean witherSkullEnabled; |     private static boolean witherSkullEnabled; | ||||||
|  |     private static boolean disablePushing; | ||||||
|  |  | ||||||
|     public static Entry<String, Disguise> getCustomDisguise(String disguise) { |     public static Entry<String, Disguise> getCustomDisguise(String disguise) { | ||||||
|         for (Entry<String, Disguise> entry : customDisguises.entrySet()) { |         for (Entry<String, Disguise> entry : customDisguises.entrySet()) { | ||||||
| @@ -68,6 +69,10 @@ public class DisguiseConfig { | |||||||
|         return null; |         return null; | ||||||
|     } |     } | ||||||
|  |  | ||||||
|  |     public static boolean isPushingDisabled() { | ||||||
|  |         return disablePushing; | ||||||
|  |     } | ||||||
|  |  | ||||||
|     public static HashMap<String, Disguise> getCustomDisguises() { |     public static HashMap<String, Disguise> getCustomDisguises() { | ||||||
|         return customDisguises; |         return customDisguises; | ||||||
|     } |     } | ||||||
| @@ -136,6 +141,7 @@ public class DisguiseConfig { | |||||||
|         setHideDisguisedPlayers(config.getBoolean("HideDisguisedPlayersFromTab")); |         setHideDisguisedPlayers(config.getBoolean("HideDisguisedPlayersFromTab")); | ||||||
|         setShowDisguisedPlayersInTab(config.getBoolean("ShowPlayerDisguisesInTab")); |         setShowDisguisedPlayersInTab(config.getBoolean("ShowPlayerDisguisesInTab")); | ||||||
|         setDisabledInvisibility(config.getBoolean("DisableInvisibility")); |         setDisabledInvisibility(config.getBoolean("DisableInvisibility")); | ||||||
|  |         disablePushing = config.getBoolean("DisablePushing"); | ||||||
|  |  | ||||||
|         customDisguises.clear(); |         customDisguises.clear(); | ||||||
|  |  | ||||||
|   | |||||||
| @@ -988,6 +988,7 @@ public class DisguiseUtilities { | |||||||
|             ex.printStackTrace(); |             ex.printStackTrace(); | ||||||
|         } |         } | ||||||
|  |  | ||||||
|  |         if (DisguiseConfig.isPushingDisabled()) { | ||||||
|             // Code to stop player pushing in 1.9 |             // Code to stop player pushing in 1.9 | ||||||
|             Scoreboard scoreboard = player.getScoreboard(); |             Scoreboard scoreboard = player.getScoreboard(); | ||||||
|             Team t; |             Team t; | ||||||
| @@ -995,6 +996,7 @@ public class DisguiseUtilities { | |||||||
|             if ((t = scoreboard.getTeam("LDPushing")) != null) { |             if ((t = scoreboard.getTeam("LDPushing")) != null) { | ||||||
|                 t.removeEntry(player.getName()); |                 t.removeEntry(player.getName()); | ||||||
|             } |             } | ||||||
|  |         } | ||||||
|  |  | ||||||
|         // player.spigot().setCollidesWithEntities(true); |         // player.spigot().setCollidesWithEntities(true); | ||||||
|         // Finish up |         // Finish up | ||||||
| @@ -1071,6 +1073,7 @@ public class DisguiseUtilities { | |||||||
|                 return; |                 return; | ||||||
|             } |             } | ||||||
|  |  | ||||||
|  |             if (DisguiseConfig.isPushingDisabled()) { | ||||||
|                 // Code to stop player pushing |                 // Code to stop player pushing | ||||||
|                 Scoreboard scoreboard = player.getScoreboard(); |                 Scoreboard scoreboard = player.getScoreboard(); | ||||||
|                 Team t; |                 Team t; | ||||||
| @@ -1086,6 +1089,7 @@ public class DisguiseUtilities { | |||||||
|  |  | ||||||
|                 if (!t.hasEntry(player.getName())) |                 if (!t.hasEntry(player.getName())) | ||||||
|                     t.addEntry(player.getName()); |                     t.addEntry(player.getName()); | ||||||
|  |             } | ||||||
|  |  | ||||||
|             // Add himself to his own entity tracker |             // Add himself to his own entity tracker | ||||||
|             Object trackedPlayersObj = ReflectionManager.getNmsField("EntityTrackerEntry", "trackedPlayers") |             Object trackedPlayersObj = ReflectionManager.getNmsField("EntityTrackerEntry", "trackedPlayers") | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user