-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
api.ashcon.app v2 was temporary disabled, so do not use it until it w…
…ill be work again
- Loading branch information
Showing
8 changed files
with
123 additions
and
69 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
src/main/java/ru/leymooo/simpleskins/utils/skinfetch/FetchResult.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
package ru.leymooo.simpleskins.utils.skinfetch; | ||
|
||
import com.velocitypowered.api.util.GameProfile.Property; | ||
import java.util.UUID; | ||
|
||
public interface FetchResult { | ||
|
||
public UUID getId(); | ||
|
||
public Property getProperty(); | ||
|
||
} |
24 changes: 24 additions & 0 deletions
24
src/main/java/ru/leymooo/simpleskins/utils/skinfetch/RateLimitedFetchResult.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package ru.leymooo.simpleskins.utils.skinfetch; | ||
|
||
import com.velocitypowered.api.util.GameProfile; | ||
import java.util.UUID; | ||
|
||
public class RateLimitedFetchResult implements FetchResult { | ||
|
||
private final UUID id; | ||
|
||
public RateLimitedFetchResult(UUID id) { | ||
this.id = id; | ||
} | ||
|
||
@Override | ||
public UUID getId() { | ||
return id; | ||
} | ||
|
||
@Override | ||
public GameProfile.Property getProperty() { | ||
return null; | ||
} | ||
|
||
} |
54 changes: 54 additions & 0 deletions
54
src/main/java/ru/leymooo/simpleskins/utils/skinfetch/SkinFetchResult.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
package ru.leymooo.simpleskins.utils.skinfetch; | ||
|
||
import com.velocitypowered.api.util.GameProfile; | ||
import java.util.Objects; | ||
import java.util.UUID; | ||
|
||
public class SkinFetchResult implements FetchResult { | ||
|
||
private final UUID id; | ||
private final GameProfile.Property property; | ||
|
||
public SkinFetchResult(UUID id, GameProfile.Property property) { | ||
this.id = id; | ||
this.property = property; | ||
} | ||
|
||
public UUID getId() { | ||
return id; | ||
} | ||
|
||
public GameProfile.Property getProperty() { | ||
return property; | ||
} | ||
|
||
@Override | ||
public int hashCode() { | ||
int hash = 3; | ||
hash = 17 * hash + Objects.hashCode(this.id); | ||
hash = 17 * hash + Objects.hashCode(this.property); | ||
return hash; | ||
} | ||
|
||
@Override | ||
public boolean equals(Object obj) { | ||
if (this == obj) { | ||
return true; | ||
} | ||
if (obj == null) { | ||
return false; | ||
} | ||
if (getClass() != obj.getClass()) { | ||
return false; | ||
} | ||
final FetchResult other = (FetchResult) obj; | ||
if (!Objects.equals(this.id, other.getId())) { | ||
return false; | ||
} | ||
if (!Objects.equals(this.property, other.getProperty())) { | ||
return false; | ||
} | ||
return true; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters