mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2024-12-26 19:17:40 +01:00
Remove code duplication.
This commit is contained in:
parent
583311ce03
commit
0cf0742c07
@ -144,8 +144,7 @@ public class PlayersManager {
|
||||
* @param number - a number - 1 is default. Can be any number.
|
||||
*/
|
||||
public void setHomeLocation(User user, Location location, int number) {
|
||||
addPlayer(user.getUniqueId());
|
||||
playerCache.get(user.getUniqueId()).setHomeLocation(location,number);
|
||||
setHomeLocation(user.getUniqueId(), location,number);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -165,8 +164,7 @@ public class PlayersManager {
|
||||
* @param location - the location
|
||||
*/
|
||||
public void setHomeLocation(UUID playerUUID, Location location) {
|
||||
addPlayer(playerUUID);
|
||||
playerCache.get(playerUUID).setHomeLocation(location,1);
|
||||
setHomeLocation(playerUUID, location,1);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user