mirror of
https://github.com/webbukkit/dynmap.git
synced 2025-03-31 16:55:50 +02:00
Add support for largeplayerfaces option for bigger player markers
This commit is contained in:
parent
8c3c0e980e
commit
634eb5fd2f
DynmapCore/src/main/resources/extracted/web
fabric-1.14.4/src/main/resources
fabric-1.15.2/src/main/resources
fabric-1.16.4/src/main/resources
fabric-1.17.1/src/main/resources
fabric-1.18/src/main/resources
forge-1.11.2/src/main/resources
forge-1.12.2/src/main/resources
forge-1.13.2/src/main/resources
forge-1.14.4/src/main/resources
forge-1.15.2/src/main/resources
forge-1.16.5/src/main/resources
forge-1.17.1/src/main/resources
forge-1.18/src/main/resources
spigot/src/main/resources
@ -584,6 +584,13 @@
|
||||
height: 16px;
|
||||
}
|
||||
|
||||
.dynmap .playerIconLg {
|
||||
margin-top: -32px;
|
||||
margin-left: -32px;
|
||||
width: 64px;
|
||||
height: 64px;
|
||||
}
|
||||
|
||||
.dynmap .playerName {
|
||||
position: absolute;
|
||||
top: -19px;
|
||||
@ -615,6 +622,22 @@
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
.dynmap .playerNameLg {
|
||||
position: absolute;
|
||||
top: -19px;
|
||||
left: 34px;
|
||||
z-index:20;
|
||||
|
||||
white-space: nowrap;
|
||||
|
||||
color: #fff;
|
||||
background: rgba(0,0,0,0.6);
|
||||
padding: 2px;
|
||||
|
||||
-moz-border-radius: 3px;
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
.dynmap .playerNameNoHealth {
|
||||
top: -7px;
|
||||
}
|
||||
@ -651,6 +674,23 @@
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
.dynmap .healthContainerLg {
|
||||
display: block;
|
||||
position: absolute;
|
||||
top: 1px;
|
||||
left: 34px;
|
||||
|
||||
width: 50px;
|
||||
|
||||
background: rgba(0,0,0,0.6);
|
||||
padding: 2px;
|
||||
|
||||
-moz-border-radius: 3px;
|
||||
border-radius: 3px;
|
||||
|
||||
z-index: 21;
|
||||
}
|
||||
|
||||
.dynmap .playerHealth {
|
||||
height: 7px;
|
||||
|
||||
|
@ -17,10 +17,10 @@ componentconstructors['playermarkers'] = function(dynmap, configuration) {
|
||||
$(div)
|
||||
.addClass('Marker')
|
||||
.addClass('playerMarker')
|
||||
.append(playerImage = $('<img/>').addClass(configuration.smallplayerfaces?'playerIconSm':'playerIcon')
|
||||
.append(playerImage = $('<img/>').addClass(configuration.smallplayerfaces?'playerIconSm':(configuration.largeplayerfaces?'playerIconLg':'playerIcon'))
|
||||
.attr({ src: 'images/player.png' }))
|
||||
.append(player.namefield = $('<span/>')
|
||||
.addClass(configuration.smallplayerfaces?'playerNameSm':'playerName')
|
||||
.addClass(configuration.smallplayerfaces?'playerNameSm':(configuration.largeplayerfaces?'playerNameLg':'playerName'))
|
||||
.append(player.name));
|
||||
|
||||
if (configuration.showplayerfaces) {
|
||||
@ -32,6 +32,14 @@ componentconstructors['playermarkers'] = function(dynmap, configuration) {
|
||||
playerImage.remove();
|
||||
});
|
||||
}
|
||||
else if(configuration.largeplayerfaces) {
|
||||
getMinecraftHead(player.account, 32, function(head) {
|
||||
$(head)
|
||||
.addClass('playerIconLg')
|
||||
.prependTo(div);
|
||||
playerImage.remove();
|
||||
});
|
||||
}
|
||||
else if(configuration.showplayerbody) {
|
||||
getMinecraftHead(player.account, 'body', function(head) {
|
||||
$(head)
|
||||
@ -51,7 +59,7 @@ componentconstructors['playermarkers'] = function(dynmap, configuration) {
|
||||
}
|
||||
if (configuration.showplayerhealth) {
|
||||
player.healthContainer = $('<div/>')
|
||||
.addClass(configuration.smallplayerfaces?'healthContainerSm':'healthContainer')
|
||||
.addClass(configuration.smallplayerfaces?'healthContainerSm':(configuration.largeplayerfaces?'healthContainerLg':'healthContainer'))
|
||||
.appendTo(div);
|
||||
if (player.health !== undefined && player.armor !== undefined) {
|
||||
player.healthBar = $('<div/>')
|
||||
|
@ -151,10 +151,12 @@ components:
|
||||
type: playermarkers
|
||||
showplayerfaces: true
|
||||
showplayerhealth: true
|
||||
# If true, show player body too (only valid if showplayerfaces=true
|
||||
# If true, show player body too (only valid if showplayerfaces=true)
|
||||
showplayerbody: false
|
||||
# Option to make player faces small - don't use with showplayerhealth
|
||||
# Option to make player faces small - don't use with showplayerhealth or largeplayerfaces
|
||||
smallplayerfaces: false
|
||||
# Option to make player faces larger - don't use with showplayerhealth or smallplayerfaces
|
||||
largeplayerfaces: false
|
||||
# Optional - make player faces layer hidden by default
|
||||
hidebydefault: false
|
||||
# Optional - ordering priority in layer menu (low goes before high - default is 0)
|
||||
|
@ -151,10 +151,12 @@ components:
|
||||
type: playermarkers
|
||||
showplayerfaces: true
|
||||
showplayerhealth: true
|
||||
# If true, show player body too (only valid if showplayerfaces=true
|
||||
# If true, show player body too (only valid if showplayerfaces=true)
|
||||
showplayerbody: false
|
||||
# Option to make player faces small - don't use with showplayerhealth
|
||||
# Option to make player faces small - don't use with showplayerhealth or largeplayerfaces
|
||||
smallplayerfaces: false
|
||||
# Option to make player faces larger - don't use with showplayerhealth or smallplayerfaces
|
||||
largeplayerfaces: false
|
||||
# Optional - make player faces layer hidden by default
|
||||
hidebydefault: false
|
||||
# Optional - ordering priority in layer menu (low goes before high - default is 0)
|
||||
|
@ -151,10 +151,12 @@ components:
|
||||
type: playermarkers
|
||||
showplayerfaces: true
|
||||
showplayerhealth: true
|
||||
# If true, show player body too (only valid if showplayerfaces=true
|
||||
# If true, show player body too (only valid if showplayerfaces=true)
|
||||
showplayerbody: false
|
||||
# Option to make player faces small - don't use with showplayerhealth
|
||||
# Option to make player faces small - don't use with showplayerhealth or largeplayerfaces
|
||||
smallplayerfaces: false
|
||||
# Option to make player faces larger - don't use with showplayerhealth or smallplayerfaces
|
||||
largeplayerfaces: false
|
||||
# Optional - make player faces layer hidden by default
|
||||
hidebydefault: false
|
||||
# Optional - ordering priority in layer menu (low goes before high - default is 0)
|
||||
|
@ -151,10 +151,12 @@ components:
|
||||
type: playermarkers
|
||||
showplayerfaces: true
|
||||
showplayerhealth: true
|
||||
# If true, show player body too (only valid if showplayerfaces=true
|
||||
# If true, show player body too (only valid if showplayerfaces=true)
|
||||
showplayerbody: false
|
||||
# Option to make player faces small - don't use with showplayerhealth
|
||||
# Option to make player faces small - don't use with showplayerhealth or largeplayerfaces
|
||||
smallplayerfaces: false
|
||||
# Option to make player faces larger - don't use with showplayerhealth or smallplayerfaces
|
||||
largeplayerfaces: false
|
||||
# Optional - make player faces layer hidden by default
|
||||
hidebydefault: false
|
||||
# Optional - ordering priority in layer menu (low goes before high - default is 0)
|
||||
|
@ -151,10 +151,12 @@ components:
|
||||
type: playermarkers
|
||||
showplayerfaces: true
|
||||
showplayerhealth: true
|
||||
# If true, show player body too (only valid if showplayerfaces=true
|
||||
# If true, show player body too (only valid if showplayerfaces=true)
|
||||
showplayerbody: false
|
||||
# Option to make player faces small - don't use with showplayerhealth
|
||||
# Option to make player faces small - don't use with showplayerhealth or largeplayerfaces
|
||||
smallplayerfaces: false
|
||||
# Option to make player faces larger - don't use with showplayerhealth or smallplayerfaces
|
||||
largeplayerfaces: false
|
||||
# Optional - make player faces layer hidden by default
|
||||
hidebydefault: false
|
||||
# Optional - ordering priority in layer menu (low goes before high - default is 0)
|
||||
|
@ -151,10 +151,12 @@ components:
|
||||
type: playermarkers
|
||||
showplayerfaces: true
|
||||
showplayerhealth: true
|
||||
# If true, show player body too (only valid if showplayerfaces=true
|
||||
# If true, show player body too (only valid if showplayerfaces=true)
|
||||
showplayerbody: false
|
||||
# Option to make player faces small - don't use with showplayerhealth
|
||||
# Option to make player faces small - don't use with showplayerhealth or largeplayerfaces
|
||||
smallplayerfaces: false
|
||||
# Option to make player faces larger - don't use with showplayerhealth or smallplayerfaces
|
||||
largeplayerfaces: false
|
||||
# Optional - make player faces layer hidden by default
|
||||
hidebydefault: false
|
||||
# Optional - ordering priority in layer menu (low goes before high - default is 0)
|
||||
|
@ -151,10 +151,12 @@ components:
|
||||
type: playermarkers
|
||||
showplayerfaces: true
|
||||
showplayerhealth: true
|
||||
# If true, show player body too (only valid if showplayerfaces=true
|
||||
# If true, show player body too (only valid if showplayerfaces=true)
|
||||
showplayerbody: false
|
||||
# Option to make player faces small - don't use with showplayerhealth
|
||||
# Option to make player faces small - don't use with showplayerhealth or largeplayerfaces
|
||||
smallplayerfaces: false
|
||||
# Option to make player faces larger - don't use with showplayerhealth or smallplayerfaces
|
||||
largeplayerfaces: false
|
||||
# Optional - make player faces layer hidden by default
|
||||
hidebydefault: false
|
||||
# Optional - ordering priority in layer menu (low goes before high - default is 0)
|
||||
|
@ -151,10 +151,12 @@ components:
|
||||
type: playermarkers
|
||||
showplayerfaces: true
|
||||
showplayerhealth: true
|
||||
# If true, show player body too (only valid if showplayerfaces=true
|
||||
# If true, show player body too (only valid if showplayerfaces=true)
|
||||
showplayerbody: false
|
||||
# Option to make player faces small - don't use with showplayerhealth
|
||||
# Option to make player faces small - don't use with showplayerhealth or largeplayerfaces
|
||||
smallplayerfaces: false
|
||||
# Option to make player faces larger - don't use with showplayerhealth or smallplayerfaces
|
||||
largeplayerfaces: false
|
||||
# Optional - make player faces layer hidden by default
|
||||
hidebydefault: false
|
||||
# Optional - ordering priority in layer menu (low goes before high - default is 0)
|
||||
|
@ -151,10 +151,12 @@ components:
|
||||
type: playermarkers
|
||||
showplayerfaces: true
|
||||
showplayerhealth: true
|
||||
# If true, show player body too (only valid if showplayerfaces=true
|
||||
# If true, show player body too (only valid if showplayerfaces=true)
|
||||
showplayerbody: false
|
||||
# Option to make player faces small - don't use with showplayerhealth
|
||||
# Option to make player faces small - don't use with showplayerhealth or largeplayerfaces
|
||||
smallplayerfaces: false
|
||||
# Option to make player faces larger - don't use with showplayerhealth or smallplayerfaces
|
||||
largeplayerfaces: false
|
||||
# Optional - make player faces layer hidden by default
|
||||
hidebydefault: false
|
||||
# Optional - ordering priority in layer menu (low goes before high - default is 0)
|
||||
|
@ -151,10 +151,12 @@ components:
|
||||
type: playermarkers
|
||||
showplayerfaces: true
|
||||
showplayerhealth: true
|
||||
# If true, show player body too (only valid if showplayerfaces=true
|
||||
# If true, show player body too (only valid if showplayerfaces=true)
|
||||
showplayerbody: false
|
||||
# Option to make player faces small - don't use with showplayerhealth
|
||||
# Option to make player faces small - don't use with showplayerhealth or largeplayerfaces
|
||||
smallplayerfaces: false
|
||||
# Option to make player faces larger - don't use with showplayerhealth or smallplayerfaces
|
||||
largeplayerfaces: false
|
||||
# Optional - make player faces layer hidden by default
|
||||
hidebydefault: false
|
||||
# Optional - ordering priority in layer menu (low goes before high - default is 0)
|
||||
|
@ -151,10 +151,12 @@ components:
|
||||
type: playermarkers
|
||||
showplayerfaces: true
|
||||
showplayerhealth: true
|
||||
# If true, show player body too (only valid if showplayerfaces=true
|
||||
# If true, show player body too (only valid if showplayerfaces=true)
|
||||
showplayerbody: false
|
||||
# Option to make player faces small - don't use with showplayerhealth
|
||||
# Option to make player faces small - don't use with showplayerhealth or largeplayerfaces
|
||||
smallplayerfaces: false
|
||||
# Option to make player faces larger - don't use with showplayerhealth or smallplayerfaces
|
||||
largeplayerfaces: false
|
||||
# Optional - make player faces layer hidden by default
|
||||
hidebydefault: false
|
||||
# Optional - ordering priority in layer menu (low goes before high - default is 0)
|
||||
|
@ -151,10 +151,12 @@ components:
|
||||
type: playermarkers
|
||||
showplayerfaces: true
|
||||
showplayerhealth: true
|
||||
# If true, show player body too (only valid if showplayerfaces=true
|
||||
# If true, show player body too (only valid if showplayerfaces=true)
|
||||
showplayerbody: false
|
||||
# Option to make player faces small - don't use with showplayerhealth
|
||||
# Option to make player faces small - don't use with showplayerhealth or largeplayerfaces
|
||||
smallplayerfaces: false
|
||||
# Option to make player faces larger - don't use with showplayerhealth or smallplayerfaces
|
||||
largeplayerfaces: false
|
||||
# Optional - make player faces layer hidden by default
|
||||
hidebydefault: false
|
||||
# Optional - ordering priority in layer menu (low goes before high - default is 0)
|
||||
|
@ -151,10 +151,12 @@ components:
|
||||
type: playermarkers
|
||||
showplayerfaces: true
|
||||
showplayerhealth: true
|
||||
# If true, show player body too (only valid if showplayerfaces=true
|
||||
# If true, show player body too (only valid if showplayerfaces=true)
|
||||
showplayerbody: false
|
||||
# Option to make player faces small - don't use with showplayerhealth
|
||||
# Option to make player faces small - don't use with showplayerhealth or largeplayerfaces
|
||||
smallplayerfaces: false
|
||||
# Option to make player faces larger - don't use with showplayerhealth or smallplayerfaces
|
||||
largeplayerfaces: false
|
||||
# Optional - make player faces layer hidden by default
|
||||
hidebydefault: false
|
||||
# Optional - ordering priority in layer menu (low goes before high - default is 0)
|
||||
|
@ -152,10 +152,12 @@ components:
|
||||
type: playermarkers
|
||||
showplayerfaces: true
|
||||
showplayerhealth: true
|
||||
# If true, show player body too (only valid if showplayerfaces=true
|
||||
# If true, show player body too (only valid if showplayerfaces=true)
|
||||
showplayerbody: false
|
||||
# Option to make player faces small - don't use with showplayerhealth
|
||||
# Option to make player faces small - don't use with showplayerhealth or largeplayerfaces
|
||||
smallplayerfaces: false
|
||||
# Option to make player faces larger - don't use with showplayerhealth or smallplayerfaces
|
||||
largeplayerfaces: false
|
||||
# Optional - make player faces layer hidden by default
|
||||
hidebydefault: false
|
||||
# Optional - ordering priority in layer menu (low goes before high - default is 0)
|
||||
|
Loading…
Reference in New Issue
Block a user