mirror of
https://github.com/BentoBoxWorld/Warps.git
synced 2024-11-10 21:09:50 +01:00
Merge remote-tracking branch 'origin/develop'
This commit is contained in:
commit
8083ce6f01
17
.github/ISSUE_TEMPLATE/bug_report.md
vendored
17
.github/ISSUE_TEMPLATE/bug_report.md
vendored
@ -5,7 +5,7 @@ about: Create a report to help us improve
|
||||
---
|
||||
|
||||
**Description**
|
||||
A clear and concise description of what the bug is.
|
||||
<!-- A clear and concise description of what the bug is. -->
|
||||
|
||||
**Steps to reproduce the behavior:**
|
||||
1. Go to '...'
|
||||
@ -14,20 +14,13 @@ A clear and concise description of what the bug is.
|
||||
4. See error
|
||||
|
||||
**Expected behavior**
|
||||
A clear and concise description of what you expected to happen.
|
||||
<!-- A clear and concise description of what you expected to happen. -->
|
||||
|
||||
**Screenshots**
|
||||
If applicable, add screenshots to help explain your problem.
|
||||
<!-- If applicable, add screenshots to help explain your problem. -->
|
||||
|
||||
**Server Information:**
|
||||
|
||||
[Please complete the following information:]
|
||||
- Database being used (YAML, JSON, MySQL, MongoDB): []
|
||||
- OS: [e.g. iOS]
|
||||
- Java Version: [e.g. Java 8]
|
||||
- BentoBox version: [e.g. 1.7.2.21]
|
||||
- Addons installed? [Do '/bentobox version' and copy/paste from the console]
|
||||
- Other plugins? [Do '/plugins' and copy/paste from the console]
|
||||
Do `bbox version` in the console and paste the result here:
|
||||
|
||||
**Additional context**
|
||||
Add any other context about the problem here.
|
||||
<!-- Add any other context about the problem here. -->
|
||||
|
@ -3,8 +3,7 @@ sudo: false
|
||||
addons:
|
||||
sonarcloud:
|
||||
organization: "bentobox-world"
|
||||
token:
|
||||
secure: $SONAR_TOKEN
|
||||
|
||||
jdk:
|
||||
- openjdk8
|
||||
- openjdk11
|
||||
|
2
pom.xml
2
pom.xml
@ -66,7 +66,7 @@
|
||||
<!-- Do not change unless you want different name for local builds. -->
|
||||
<build.number>-LOCAL</build.number>
|
||||
<!-- This allows to change between versions. -->
|
||||
<build.version>1.8.1</build.version>
|
||||
<build.version>1.8.2</build.version>
|
||||
</properties>
|
||||
|
||||
<!-- Profiles will allow to automatically change build version. -->
|
||||
|
@ -83,7 +83,7 @@ public class Warp extends Addon {
|
||||
// Save default config.yml
|
||||
this.saveDefaultConfig();
|
||||
// Load the plugin's config
|
||||
if (this.loadSettings()) {
|
||||
if (this.loadSettings() && settings.isAllowInOtherWorlds()) {
|
||||
// Load the master warp and warps command
|
||||
new WarpCommand(this);
|
||||
new WarpsCommand(this);
|
||||
|
@ -317,7 +317,7 @@ public class WarpSignsManager {
|
||||
*/
|
||||
private void warpPlayer(@NonNull User user, @NonNull Location inFront, @NonNull UUID signOwner, @NonNull BlockFace directionFacing, boolean pvp) {
|
||||
// convert blockface to angle
|
||||
float yaw = blockFaceToFloat(directionFacing);
|
||||
float yaw = Util.blockFaceToFloat(directionFacing);
|
||||
final Location actualWarp = new Location(inFront.getWorld(), inFront.getBlockX() + 0.5D, inFront.getBlockY(),
|
||||
inFront.getBlockZ() + 0.5D, yaw, 30F);
|
||||
user.teleport(actualWarp);
|
||||
@ -333,52 +333,6 @@ public class WarpSignsManager {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts block face direction to radial degrees. Returns 0 if block face
|
||||
* is not radial.
|
||||
*
|
||||
* @param face
|
||||
* @return degrees
|
||||
*/
|
||||
private float blockFaceToFloat(@NonNull BlockFace face) {
|
||||
switch (face) {
|
||||
case EAST:
|
||||
return 90F;
|
||||
case EAST_NORTH_EAST:
|
||||
return 67.5F;
|
||||
case EAST_SOUTH_EAST:
|
||||
return 0F;
|
||||
case NORTH:
|
||||
return 0F;
|
||||
case NORTH_EAST:
|
||||
return 45F;
|
||||
case NORTH_NORTH_EAST:
|
||||
return 22.5F;
|
||||
case NORTH_NORTH_WEST:
|
||||
return 337.5F;
|
||||
case NORTH_WEST:
|
||||
return 315F;
|
||||
case SOUTH:
|
||||
return 180F;
|
||||
case SOUTH_EAST:
|
||||
return 135F;
|
||||
case SOUTH_SOUTH_EAST:
|
||||
return 157.5F;
|
||||
case SOUTH_SOUTH_WEST:
|
||||
return 202.5F;
|
||||
case SOUTH_WEST:
|
||||
return 225F;
|
||||
case WEST:
|
||||
return 270F;
|
||||
case WEST_NORTH_WEST:
|
||||
return 292.5F;
|
||||
case WEST_SOUTH_WEST:
|
||||
return 247.5F;
|
||||
default:
|
||||
return 0F;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Warps a user to the warp owner by owner
|
||||
*
|
||||
|
1
src/main/resources/locales/id.yml
Normal file
1
src/main/resources/locales/id.yml
Normal file
@ -0,0 +1 @@
|
||||
|
1
src/main/resources/locales/ro.yml
Normal file
1
src/main/resources/locales/ro.yml
Normal file
@ -0,0 +1 @@
|
||||
|
Loading…
Reference in New Issue
Block a user