Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
MythicCraft
MythicCosmetics
Commits
a1c12a77
Commit
a1c12a77
authored
2 years ago
by
Ashijin
Browse files
Options
Download
Email Patches
Plain Diff
Fixed emotes and other bugs on 1.19.2
parent
b0a7e0e2
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
31 additions
and
15 deletions
+31
-15
plugin/pom.xml
plugin/pom.xml
+1
-1
plugin/src/main/java/io/lumine/cosmetics/storage/sql/SqlStorage.java
...main/java/io/lumine/cosmetics/storage/sql/SqlStorage.java
+25
-5
v1_19_R1_2/src/main/java/io/lumine/cosmetics/nms/v1_19_R1_2/cosmetic/VolatileHatImpl.java
...ne/cosmetics/nms/v1_19_R1_2/cosmetic/VolatileHatImpl.java
+4
-6
v1_19_R1_2/src/main/java/io/lumine/cosmetics/nms/v1_19_R1_2/cosmetic/VolatileOffhandImpl.java
...osmetics/nms/v1_19_R1_2/cosmetic/VolatileOffhandImpl.java
+1
-3
No files found.
plugin/pom.xml
View file @
a1c12a77
...
...
@@ -187,7 +187,7 @@
<dependency>
<groupId>
com.ticxo.playeranimator
</groupId>
<artifactId>
PlayerAnimator
</artifactId>
<version>
R1.2.
2
</version>
<version>
R1.2.
4
</version>
</dependency>
<!-- Spigot API -->
...
...
This diff is collapsed.
Click to expand it.
plugin/src/main/java/io/lumine/cosmetics/storage/sql/SqlStorage.java
View file @
a1c12a77
...
...
@@ -2,34 +2,54 @@ package io.lumine.cosmetics.storage.sql;
import
java.util.UUID
;
import
io.lumine.utils.plugin.LuminePlugin
;
import
io.lumine.utils.promise.Promise
;
import
io.lumine.utils.storage.players.Profile
;
import
io.lumine.utils.storage.players.adapters.SqlPlayerStorageAdapter
;
import
io.lumine.utils.storage.sql.SqlConnector
;
public
class
SqlStorage
implements
SqlPlayerStorageAdapter
{
public
class
SqlStorage
<
MCCosmeticsPlugin
,
CosmeticsProfile
>
extends
SqlPlayerStorageAdapter
{
public
SqlStorage
(
LuminePlugin
plugin
,
SqlConnector
connector
)
{
super
(
plugin
,
connector
);
// TODO Auto-generated constructor stub
}
@Override
public
void
load
(
LuminePlugin
arg0
)
{
// TODO Auto-generated method stub
}
@Override
public
Promise
load
(
UUID
uuid
)
{
public
void
unload
()
{
// TODO Auto-generated method stub
}
@Override
public
Promise
load
(
UUID
arg0
)
{
// TODO Auto-generated method stub
return
null
;
}
@Override
public
Promise
loadByName
(
String
name
)
{
public
Promise
loadByName
(
String
arg0
)
{
// TODO Auto-generated method stub
return
null
;
}
@Override
public
Promise
save
(
UUID
uuid
,
Profile
profile
)
{
public
Promise
save
(
UUID
arg0
,
Profile
arg1
)
{
// TODO Auto-generated method stub
return
null
;
}
@Override
public
boolean
saveSync
(
UUID
uuid
,
Profile
profile
)
{
public
boolean
saveSync
(
UUID
arg0
,
Profile
arg1
)
{
// TODO Auto-generated method stub
return
false
;
}
}
This diff is collapsed.
Click to expand it.
v1_19_R1_2/src/main/java/io/lumine/cosmetics/nms/v1_19_R1_2/cosmetic/VolatileHatImpl.java
View file @
a1c12a77
...
...
@@ -107,7 +107,6 @@ public class VolatileHatImpl implements VolatileEquipmentHelper {
}
public
void
handleSpawn
(
Profile
profile
)
{
/*
final
var
maybeEquipped
=
profile
.
getEquipped
(
Hat
.
class
);
if
(
maybeEquipped
.
isEmpty
())
{
return
;
...
...
@@ -122,13 +121,12 @@ public class VolatileHatImpl implements VolatileEquipmentHelper {
final
var
nmsHat
=
CraftItemStack
.
asNMSCopy
(
hat
.
getCosmetic
(
equip
));
ClientboundSetEquipmentPacket
equipmentPacket
=
new
ClientboundSetEquipmentPacket
(
player
.
getEntityId
(),
List
.
of
(
Pair
.
of
(
EquipmentSlot
.
HEAD
,
nmsHat
)));
FriendlyByteBuf byteBuf = new FriendlyByteBuf(Unpooled.buffer());
byteBuf.writeByte(80);
equipmentPacket.write(byteBuf);
//
FriendlyByteBuf byteBuf = new FriendlyByteBuf(Unpooled.buffer());
//
byteBuf.writeByte(80);
//
equipmentPacket.write(byteBuf);
final
var
pipeline
=
((
CraftPlayer
)
player
).
getHandle
().
connection
.
getConnection
().
channel
.
pipeline
();
pipeline.writeAndFlush(byteBuf);
*/
pipeline
.
writeAndFlush
(
equipmentPacket
);
}
}
This diff is collapsed.
Click to expand it.
v1_19_R1_2/src/main/java/io/lumine/cosmetics/nms/v1_19_R1_2/cosmetic/VolatileOffhandImpl.java
View file @
a1c12a77
...
...
@@ -94,7 +94,6 @@ public class VolatileOffhandImpl implements VolatileEquipmentHelper {
}
public
void
handleSpawn
(
Profile
profile
)
{
/*
final
var
maybeEquipped
=
profile
.
getEquipped
(
Offhand
.
class
);
if
(
maybeEquipped
.
isEmpty
())
{
return
;
...
...
@@ -114,8 +113,7 @@ public class VolatileOffhandImpl implements VolatileEquipmentHelper {
equipmentPacket
.
write
(
byteBuf
);
final
var
pipeline
=
((
CraftPlayer
)
player
).
getHandle
().
connection
.
getConnection
().
channel
.
pipeline
();
pipeline.writeAndFlush(byteBuf);
*/
pipeline
.
writeAndFlush
(
equipmentPacket
);
}
}
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment