mirror of
				https://github.com/IntellectualSites/PlotSquared.git
				synced 2025-11-04 03:03:43 +01:00 
			
		
		
		
	Don't teleport players; Fixes PS-14
This commit is contained in:
		
				
					committed by
					
						
						Alexander Söderberg
					
				
			
			
				
	
			
			
			
						parent
						
							6259287dff
						
					
				
				
					commit
					cb969e37a6
				
			@@ -100,15 +100,15 @@ public class EntitySpawnListener implements Listener {
 | 
				
			|||||||
            if (!originWorld.equals(world)) {
 | 
					            if (!originWorld.equals(world)) {
 | 
				
			||||||
                if (!ignoreTP) {
 | 
					                if (!ignoreTP) {
 | 
				
			||||||
                    if (!world.getName().equalsIgnoreCase(originWorld + "_the_end")) {
 | 
					                    if (!world.getName().equalsIgnoreCase(originWorld + "_the_end")) {
 | 
				
			||||||
 | 
					                        if (entity.getType() == EntityType.PLAYER) {
 | 
				
			||||||
 | 
					                            return;
 | 
				
			||||||
 | 
					                        }
 | 
				
			||||||
                        try {
 | 
					                        try {
 | 
				
			||||||
                            ignoreTP = true;
 | 
					                            ignoreTP = true;
 | 
				
			||||||
                            PaperLib.teleportAsync(entity, origin);
 | 
					                            PaperLib.teleportAsync(entity, origin);
 | 
				
			||||||
                        } finally {
 | 
					                        } finally {
 | 
				
			||||||
                            ignoreTP = false;
 | 
					                            ignoreTP = false;
 | 
				
			||||||
                        }
 | 
					                        }
 | 
				
			||||||
                        if (entity.getType() == EntityType.PLAYER) {
 | 
					 | 
				
			||||||
                            return;
 | 
					 | 
				
			||||||
                        }
 | 
					 | 
				
			||||||
                        if (entity.getLocation().getWorld().equals(world)) {
 | 
					                        if (entity.getLocation().getWorld().equals(world)) {
 | 
				
			||||||
                            entity.remove();
 | 
					                            entity.remove();
 | 
				
			||||||
                        }
 | 
					                        }
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user